pub struct FsyncComponents(/* private fields */);Expand description
The set of repository parts to harden through an FsyncMethod barrier,
mirroring upstream enum fsync_component (git 2.55 write-or-die.h).
Implementations§
Source§impl FsyncComponents
impl FsyncComponents
Sourcepub const NONE: Self
pub const NONE: Self
Upstream FSYNC_COMPONENT_NONE: data that is not persistent and must
never be synced.
pub const LOOSE_OBJECT: Self
pub const PACK: Self
pub const PACK_METADATA: Self
pub const COMMIT_GRAPH: Self
pub const INDEX: Self
pub const REFERENCE: Self
pub const OBJECT_MAP: Self
Sourcepub const DERIVED_METADATA: Self
pub const DERIVED_METADATA: Self
Upstream FSYNC_COMPONENTS_DERIVED_METADATA.
Sourcepub const PLATFORM_DEFAULT: Self = Self::DEFAULT
pub const PLATFORM_DEFAULT: Self = Self::DEFAULT
Upstream FSYNC_COMPONENTS_PLATFORM_DEFAULT. No platform overrides it
in git v2.55, so this equals Self::DEFAULT everywhere today; kept
separate because git exposes the default as compile-time platform
policy and parse starts from it.
Sourcepub fn parse(value: &str) -> Self
pub fn parse(value: &str) -> Self
Parse one core.fsync value into a component set.
Grammar (upstream parse_fsync_components): start from
Self::PLATFORM_DEFAULT; none resets the running base to empty;
each remaining comma-separated component is trimmed and prefix-matched
against Self::COMPONENT_TABLE, accumulating into negative or
positive masks by leading -; finally the result is
(base & ~negative) | positive, so a component named both ways wins
as positive in either order. Unknown components are ignored, and a
bare - ends parsing like upstream’s warning path.
Sourcepub const fn includes_reference(self) -> bool
pub const fn includes_reference(self) -> bool
Whether reference files are included, replacing the old
core_fsync_includes_reference predicate on equal terms.
Trait Implementations§
Source§impl Clone for FsyncComponents
impl Clone for FsyncComponents
Source§fn clone(&self) -> FsyncComponents
fn clone(&self) -> FsyncComponents
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more