pub enum HashFormat {
V1,
V2,
}Expand description
Repository-level content-addressing format. See the module docs for the preimage definitions and the migration story.
Variants§
V1
Bare BLAKE3 over raw bytes; \n-joined commit fields, files excluded.
The format of every existing repository.
V2
Domain-prefixed BLAKE3, length-prefixed commit fields, files included. Prepared but not enabled anywhere — no CLI command or migration can switch a repo to it yet.
Implementations§
Source§impl HashFormat
impl HashFormat
Sourcepub fn from_metadata(value: Option<&str>) -> Result<Self>
pub fn from_metadata(value: Option<&str>) -> Result<Self>
Parse the repo-level hash_format metadata value. Absent means v1 —
the format of every repository written before the flag existed. An
unrecognized value is an error (a newer repo this build can’t read),
not a silent fallback.
Trait Implementations§
Source§impl Clone for HashFormat
impl Clone for HashFormat
impl Copy for HashFormat
Source§impl Debug for HashFormat
impl Debug for HashFormat
Source§impl Default for HashFormat
impl Default for HashFormat
impl Eq for HashFormat
Source§impl PartialEq for HashFormat
impl PartialEq for HashFormat
impl StructuralPartialEq for HashFormat
Auto Trait Implementations§
impl Forget for HashFormat
impl Freeze for HashFormat
impl Move for HashFormat
impl RefUnwindSafe for HashFormat
impl Send for HashFormat
impl Sync for HashFormat
impl Unpin for HashFormat
impl UnsafeUnpin for HashFormat
impl UnwindSafe for HashFormat
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 more