pub struct RenameBuilder { /* private fields */ }Expand description
Build a rename mutation. The single record at <folder>/<from>.md is
renamed to <folder>/<to>.md, and every [[wikilink]] across the vault
pointing at from is rewritten to point at to.
Handled wikilink shapes: [[from]], [[from|alias]], [[from#section]],
[[from#section|alias]].
Implementations§
Source§impl RenameBuilder
impl RenameBuilder
pub fn new( folder: impl Into<String>, from: impl Into<String>, to: impl Into<String>, ) -> 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 rename + backlink rewrites (fsync every modified file’s data and every modified directory’s dirent).
pub fn plan(&self, vault: &Vault) -> Result<MutationReport>
pub fn execute(self, vault: &Vault) -> Result<MutationReport>
Trait Implementations§
Source§impl Clone for RenameBuilder
impl Clone for RenameBuilder
Source§fn clone(&self) -> RenameBuilder
fn clone(&self) -> RenameBuilder
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 RenameBuilder
impl RefUnwindSafe for RenameBuilder
impl Send for RenameBuilder
impl Sync for RenameBuilder
impl Unpin for RenameBuilder
impl UnsafeUnpin for RenameBuilder
impl UnwindSafe for RenameBuilder
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