pub struct WriterFolder { /* private fields */ }Expand description
One area’s folder, held for a run of files made in it: the store’s read lock, taken once, and the folder’s resolved path, shared by every writer made here. The lock lasts until the last of those writers, and any batch one finished into, lets go of it.
Implementations§
Source§impl WriterFolder
impl WriterFolder
Sourcepub fn create(&self, name: &FileName) -> Result<FileWriter, FileError>
pub fn create(&self, name: &FileName) -> Result<FileWriter, FileError>
Create name here for asynchronous streaming without replacing
anything.
Sourcepub fn write_whole(
&self,
name: &FileName,
bytes: &[u8],
batch: &mut FlushBatch,
) -> Result<(), FileError>
pub fn write_whole( &self, name: &FileName, bytes: &[u8], batch: &mut FlushBatch, ) -> Result<(), FileError>
Create name here holding all of bytes and count it in batch, as
FileWriter::write_from does for a source it reads, but in this one
call: it blocks on the file’s I/O, so a caller on an async runtime
runs it on the blocking pool.
Trait Implementations§
Source§impl Clone for WriterFolder
impl Clone for WriterFolder
Source§fn clone(&self) -> WriterFolder
fn clone(&self) -> WriterFolder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WriterFolder
impl !RefUnwindSafe for WriterFolder
impl Send for WriterFolder
impl Sync for WriterFolder
impl Unpin for WriterFolder
impl UnsafeUnpin for WriterFolder
impl !UnwindSafe for WriterFolder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more