pub struct DeleteBuilder { /* private fields */ }Expand description
Build a delete mutation. Records matching filter are moved to
<vault>/.trash/ by default (collision-safe). With permanent(true),
files are removed entirely.
Implementations§
Source§impl DeleteBuilder
impl DeleteBuilder
pub fn new(folder: impl Into<String>, filter: Expr) -> Self
Sourcepub fn recursive(self, yes: bool) -> Self
pub fn recursive(self, yes: bool) -> Self
Recurse into subfolders when selecting records to delete (default
false — only files directly in folder are considered).
pub fn permanent(self, yes: bool) -> Self
Sourcepub fn write_options(self, opts: WriteOptions) -> Self
pub fn write_options(self, opts: WriteOptions) -> Self
Replace the writer::WriteOptions used by execute.
Sourcepub fn fsync(self, yes: bool) -> Self
pub fn fsync(self, yes: bool) -> Self
Convenience: enable durable deletes (fsync the parent dir so the dirent change is on disk before this returns).
pub fn plan(&self, vault: &Vault) -> Result<MutationReport>
pub fn execute(self, vault: &Vault) -> Result<MutationReport>
Trait Implementations§
Source§impl Clone for DeleteBuilder
impl Clone for DeleteBuilder
Source§fn clone(&self) -> DeleteBuilder
fn clone(&self) -> DeleteBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DeleteBuilder
impl RefUnwindSafe for DeleteBuilder
impl Send for DeleteBuilder
impl Sync for DeleteBuilder
impl Unpin for DeleteBuilder
impl UnsafeUnpin for DeleteBuilder
impl UnwindSafe for DeleteBuilder
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