pub struct FileSink { /* private fields */ }Expand description
A file being written through a temporary sibling, renamed on
ContentSink::finish so a partial write
never replaces a good file. Its handle writes on a
thread of its own.
Implementations§
Source§impl FileSink
impl FileSink
Sourcepub fn create(destination: impl Into<PathBuf>) -> Result<Self, ContentError>
pub fn create(destination: impl Into<PathBuf>) -> Result<Self, ContentError>
Opens a staged writer for destination.
Sourcepub fn handle(self) -> ContentSinkRef
pub fn handle(self) -> ContentSinkRef
A shared handle to this sink, which writes on a thread of its own.
Sourcepub fn destination(&self) -> &Path
pub fn destination(&self) -> &Path
The path this sink commits to.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileSink
impl RefUnwindSafe for FileSink
impl Send for FileSink
impl Sync for FileSink
impl Unpin for FileSink
impl UnsafeUnpin for FileSink
impl UnwindSafe for FileSink
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