pub struct ImportOptions<'a> {
pub depth: Depth,
pub no_ignore: bool,
pub no_autoprops: bool,
pub ignore_unknown_node_types: bool,
pub revprop_table: Option<HashMap<String, String>>,
pub filter_callback: Option<&'a mut dyn FnMut(&mut bool, &Path, &Dirent) -> Result<(), Error<'static>>>,
pub commit_callback: Option<&'a mut dyn FnMut(&CommitInfo<'_>) -> Result<(), Error<'static>>>,
}Expand description
Options for import operations
Fields§
§depth: DepthRecursion depth.
no_ignore: boolIf true, don’t use default ignores.
no_autoprops: boolIf true, don’t use auto-props.
ignore_unknown_node_types: boolIf true, ignore unknown node types instead of erroring.
revprop_table: Option<HashMap<String, String>>Revision properties for the commit.
filter_callback: Option<&'a mut dyn FnMut(&mut bool, &Path, &Dirent) -> Result<(), Error<'static>>>Optional filter callback to control which files are imported.
commit_callback: Option<&'a mut dyn FnMut(&CommitInfo<'_>) -> Result<(), Error<'static>>>Optional callback to invoke after commit.
Implementations§
Source§impl<'a> ImportOptions<'a>
impl<'a> ImportOptions<'a>
Sourcepub fn with_depth(self, depth: Depth) -> Self
pub fn with_depth(self, depth: Depth) -> Self
Sets the depth for the import.
Sourcepub fn with_no_ignore(self, no_ignore: bool) -> Self
pub fn with_no_ignore(self, no_ignore: bool) -> Self
Sets whether to ignore default ignores.
Sourcepub fn with_no_autoprops(self, no_autoprops: bool) -> Self
pub fn with_no_autoprops(self, no_autoprops: bool) -> Self
Sets whether to disable auto-props.
Sourcepub fn with_ignore_unknown_node_types(self, ignore: bool) -> Self
pub fn with_ignore_unknown_node_types(self, ignore: bool) -> Self
Sets whether to ignore unknown node types.
Sourcepub fn with_revprop_table(self, revprops: HashMap<String, String>) -> Self
pub fn with_revprop_table(self, revprops: HashMap<String, String>) -> Self
Sets the revision properties.
Sourcepub fn with_filter_callback(
self,
callback: &'a mut dyn FnMut(&mut bool, &Path, &Dirent) -> Result<(), Error<'static>>,
) -> Self
pub fn with_filter_callback( self, callback: &'a mut dyn FnMut(&mut bool, &Path, &Dirent) -> Result<(), Error<'static>>, ) -> Self
Sets the filter callback.
Sourcepub fn with_commit_callback(
self,
callback: &'a mut dyn FnMut(&CommitInfo<'_>) -> Result<(), Error<'static>>,
) -> Self
pub fn with_commit_callback( self, callback: &'a mut dyn FnMut(&CommitInfo<'_>) -> Result<(), Error<'static>>, ) -> Self
Sets the commit callback.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ImportOptions<'a>
impl<'a> !RefUnwindSafe for ImportOptions<'a>
impl<'a> !Send for ImportOptions<'a>
impl<'a> !Sync for ImportOptions<'a>
impl<'a> Unpin for ImportOptions<'a>
impl<'a> UnsafeUnpin for ImportOptions<'a>
impl<'a> !UnwindSafe for ImportOptions<'a>
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