pub trait FolderWriter: Send {
// Required methods
fn write_chunk(&mut self, bytes: &[u8]) -> Result<(), FolderError>;
fn finish(self: Box<Self>) -> Result<(), FolderError>;
}Expand description
Chunked writer over one file in a writable folder.
The file is only visible under its final name once finish succeeds;
dropping a writer without finishing discards the partial write.
Required Methods§
Sourcefn write_chunk(&mut self, bytes: &[u8]) -> Result<(), FolderError>
fn write_chunk(&mut self, bytes: &[u8]) -> Result<(), FolderError>
Appends bytes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".