pub struct DuplicateOptions {
pub source_dir: PathBuf,
pub target_dir: PathBuf,
pub item_id: String,
pub new_id: Option<String>,
pub new_title: Option<String>,
}Expand description
Options for duplicating an item.
Fields§
§source_dir: PathBufPath to the directory containing the source item type
target_dir: PathBufPath to the target directory (can be same as source)
item_id: StringID of the item to duplicate
new_id: Option<String>Override for the new item’s ID (for slug-identified types)
new_title: Option<String>Override for the new item’s title (default: “Copy of {original}”)
Trait Implementations§
Source§impl Clone for DuplicateOptions
impl Clone for DuplicateOptions
Source§fn clone(&self) -> DuplicateOptions
fn clone(&self) -> DuplicateOptions
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 moreAuto Trait Implementations§
impl Freeze for DuplicateOptions
impl RefUnwindSafe for DuplicateOptions
impl Send for DuplicateOptions
impl Sync for DuplicateOptions
impl Unpin for DuplicateOptions
impl UnsafeUnpin for DuplicateOptions
impl UnwindSafe for DuplicateOptions
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