pub struct DiffOptions {
pub parent_manifest_hash: Option<String>,
pub ignore_hashes: bool,
pub preserve_runnable: bool,
}Expand description
Options controlling the DIFF operation (diff_snapshots).
Fields§
§parent_manifest_hash: Option<String>Hash of the parent manifest to record in the diff’s
parent_manifest_hash field. The caller computes this from the
parent’s serialized form.
ignore_hashes: boolIf true, ignore hash/chunk_hashes when comparing entries and
skip the hash-state compatibility check. Useful for fast diffs where
only metadata (size, mtime, runnable) is compared.
preserve_runnable: boolIf true, the runnable field is treated specially when a file appears
in both snapshots:
- Comparison:
runnableis ignored when deciding whether the file changed (so a Windows collector that lost the POSIX execute bit does not cause a spurious “modified” entry). - Preservation: if the file is otherwise modified (size, mtime, or
hash differs), the parent entry’s
runnablevalue is copied into the diff entry instead of the current entry’s value.
The comparison half is delegated to entries_differ via its
ignore_runnable parameter; the preservation half is applied by
diff_snapshots itself when it emits the diff entry.
Trait Implementations§
Source§impl Default for DiffOptions
impl Default for DiffOptions
Source§fn default() -> DiffOptions
fn default() -> DiffOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiffOptions
impl RefUnwindSafe for DiffOptions
impl Send for DiffOptions
impl Sync for DiffOptions
impl Unpin for DiffOptions
impl UnsafeUnpin for DiffOptions
impl UnwindSafe for DiffOptions
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.