Skip to main content

DumpOptions

Struct DumpOptions 

Source
pub struct DumpOptions<'a> {
    pub start_rev: Option<Revnum>,
    pub end_rev: Option<Revnum>,
    pub incremental: bool,
    pub use_deltas: bool,
    pub include_revprops: bool,
    pub include_changes: bool,
    pub notify_func: Option<&'a dyn Fn(&Notify<'_>)>,
    pub filter_func: Option<Box<dyn FnMut(&Root<'_>, &str) -> Result<bool, Error<'static>> + 'a>>,
    pub cancel_func: Option<&'a dyn Fn() -> Result<(), Error<'static>>>,
}
Expand description

Options for repository dump operations.

Fields§

§start_rev: Option<Revnum>

Starting revision (None for revision 0).

§end_rev: Option<Revnum>

Ending revision (None for HEAD).

§incremental: bool

If true, produce incremental dump (only changes since start_rev).

§use_deltas: bool

If true, use deltas for file contents.

§include_revprops: bool

If true, include revision properties.

§include_changes: bool

If true, include node changes.

§notify_func: Option<&'a dyn Fn(&Notify<'_>)>

Optional notification callback.

§filter_func: Option<Box<dyn FnMut(&Root<'_>, &str) -> Result<bool, Error<'static>> + 'a>>

Optional filter callback to control which paths are dumped.

§cancel_func: Option<&'a dyn Fn() -> Result<(), Error<'static>>>

Optional cancellation callback.

Implementations§

Source§

impl<'a> DumpOptions<'a>

Source

pub fn new() -> Self

Creates new DumpOptions with default values.

Source

pub fn with_start_rev(self, rev: Revnum) -> Self

Sets the starting revision.

Source

pub fn with_end_rev(self, rev: Revnum) -> Self

Sets the ending revision.

Source

pub fn with_incremental(self, incremental: bool) -> Self

Sets whether to produce an incremental dump.

Source

pub fn with_use_deltas(self, use_deltas: bool) -> Self

Sets whether to use deltas for file contents.

Source

pub fn with_include_revprops(self, include: bool) -> Self

Sets whether to include revision properties.

Source

pub fn with_include_changes(self, include: bool) -> Self

Sets whether to include node changes.

Trait Implementations§

Source§

impl<'a> Default for DumpOptions<'a>

Source§

fn default() -> DumpOptions<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DumpOptions<'a>

§

impl<'a> !RefUnwindSafe for DumpOptions<'a>

§

impl<'a> !Send for DumpOptions<'a>

§

impl<'a> !Sync for DumpOptions<'a>

§

impl<'a> Unpin for DumpOptions<'a>

§

impl<'a> UnsafeUnpin for DumpOptions<'a>

§

impl<'a> !UnwindSafe for DumpOptions<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.