pub struct CommitId(/* private fields */);Expand description
A BLAKE3 content hash identifying a commit. Two commits with byte-identical
parent_ids + author + delta + metadata always produce the same id.
Construct with CommitId::from_bytes (or, more commonly, by calling
Commit::new or compute_commit_id); use CommitId::as_bytes to read
the underlying 32 bytes.
Implementations§
Source§impl CommitId
impl CommitId
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
Wraps a 32-byte hash. Use compute_commit_id to derive an id from
content, or this constructor to wrap an id you already have (e.g.
loaded from a foreign storage layer).
Trait Implementations§
Source§impl Binary for CommitId
Binary formatting of each byte, 8-bit zero-padded with separators
(e.g. "00000001.00000010"). Useful for low-level debugging; output is
always 287 characters.
impl Binary for CommitId
Binary formatting of each byte, 8-bit zero-padded with separators
(e.g. "00000001.00000010"). Useful for low-level debugging; output is
always 287 characters.
impl Copy for CommitId
Source§impl<'de> Deserialize<'de> for CommitId
impl<'de> Deserialize<'de> for CommitId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CommitId
Source§impl From<CommitId> for CheckoutTarget
impl From<CommitId> for CheckoutTarget
Source§impl Octal for CommitId
Octal formatting of each byte, two-digit zero-padded (e.g. for printf-
style debugging). The output length is always 86 characters (32 bytes ×
3 chars including a separator).
impl Octal for CommitId
Octal formatting of each byte, two-digit zero-padded (e.g. for printf-
style debugging). The output length is always 86 characters (32 bytes ×
3 chars including a separator).
Source§impl Ord for CommitId
impl Ord for CommitId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for CommitId
impl PartialOrd for CommitId
impl StructuralPartialEq for CommitId
Auto Trait Implementations§
impl Forget for CommitId
impl Freeze for CommitId
impl Move for CommitId
impl RefUnwindSafe for CommitId
impl Send for CommitId
impl Sync for CommitId
impl Unpin for CommitId
impl UnsafeUnpin for CommitId
impl UnwindSafe for CommitId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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