pub struct SafeWriter { /* private fields */ }Expand description
Implements atomic file write pattern with content verification
Implementations§
Source§impl SafeWriter
impl SafeWriter
Sourcepub async fn write(
&self,
path: &Path,
content: &str,
conflict_resolution: ConflictResolution,
) -> Result<FileOperation, FileError>
pub async fn write( &self, path: &Path, content: &str, conflict_resolution: ConflictResolution, ) -> Result<FileOperation, FileError>
Trait Implementations§
Source§impl Clone for SafeWriter
impl Clone for SafeWriter
Source§fn clone(&self) -> SafeWriter
fn clone(&self) -> SafeWriter
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 moreSource§impl Debug for SafeWriter
impl Debug for SafeWriter
Auto Trait Implementations§
impl Freeze for SafeWriter
impl RefUnwindSafe for SafeWriter
impl Send for SafeWriter
impl Sync for SafeWriter
impl Unpin for SafeWriter
impl UnwindSafe for SafeWriter
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