pub struct LoadOptions<'a> {
pub start_rev: Option<Revnum>,
pub end_rev: Option<Revnum>,
pub uuid_action: LoadUUID,
pub parent_dir: Option<&'a str>,
pub use_pre_commit_hook: bool,
pub use_post_commit_hook: bool,
pub validate_props: bool,
pub ignore_dates: bool,
pub normalize_props: bool,
pub notify_func: Option<&'a dyn Fn(&Notify<'_>)>,
pub cancel_func: Option<&'a dyn Fn() -> Result<(), Error<'static>>>,
}Expand description
Options for repository load operations.
Fields§
§start_rev: Option<Revnum>Starting revision (None for all revisions).
end_rev: Option<Revnum>Ending revision (None for all revisions).
uuid_action: LoadUUIDHow to handle UUID from dump stream.
parent_dir: Option<&'a str>Parent directory to load into (None for root).
use_pre_commit_hook: boolIf true, run pre-commit hook for each loaded revision.
use_post_commit_hook: boolIf true, run post-commit hook for each loaded revision.
validate_props: boolIf true, validate properties.
ignore_dates: boolIf true, ignore dates from dump and use current time.
normalize_props: boolIf true, normalize properties (e.g., line endings).
notify_func: Option<&'a dyn Fn(&Notify<'_>)>Optional notification callback.
cancel_func: Option<&'a dyn Fn() -> Result<(), Error<'static>>>Optional cancellation callback.
Implementations§
Source§impl<'a> LoadOptions<'a>
impl<'a> LoadOptions<'a>
Sourcepub fn with_start_rev(self, rev: Revnum) -> Self
pub fn with_start_rev(self, rev: Revnum) -> Self
Sets the starting revision.
Sourcepub fn with_end_rev(self, rev: Revnum) -> Self
pub fn with_end_rev(self, rev: Revnum) -> Self
Sets the ending revision.
Sourcepub fn with_uuid_action(self, action: LoadUUID) -> Self
pub fn with_uuid_action(self, action: LoadUUID) -> Self
Sets how to handle UUID from dump stream.
Sourcepub fn with_parent_dir(self, dir: &'a str) -> Self
pub fn with_parent_dir(self, dir: &'a str) -> Self
Sets the parent directory to load into.
Sourcepub fn with_use_pre_commit_hook(self, use_hook: bool) -> Self
pub fn with_use_pre_commit_hook(self, use_hook: bool) -> Self
Sets whether to run pre-commit hooks.
Sourcepub fn with_use_post_commit_hook(self, use_hook: bool) -> Self
pub fn with_use_post_commit_hook(self, use_hook: bool) -> Self
Sets whether to run post-commit hooks.
Sourcepub fn with_validate_props(self, validate: bool) -> Self
pub fn with_validate_props(self, validate: bool) -> Self
Sets whether to validate properties.
Sourcepub fn with_ignore_dates(self, ignore: bool) -> Self
pub fn with_ignore_dates(self, ignore: bool) -> Self
Sets whether to ignore dates from dump.
Sourcepub fn with_normalize_props(self, normalize: bool) -> Self
pub fn with_normalize_props(self, normalize: bool) -> Self
Sets whether to normalize properties.