pub struct CommitId(/* private fields */);Expand description
A BLAKE3-derived, content-addressed commit id (DESIGN §4.1).
CommitId is a pure function of the commit’s parents and its canonically
encoded operations, so the same sequence of operations produces the same ids
on every operating system (DESIGN §3.6), which a golden file pins.
Implementations§
Source§impl CommitId
impl CommitId
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Rebuild an id from its raw bytes.
Used when reading a journal record back. Nothing checks that the bytes are the hash of anything: replay recomputes every id it installs, and an id read from a record is only a reference to a commit replay has already rebuilt.
Trait Implementations§
impl Copy for CommitId
impl Eq for CommitId
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,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for CommitId
impl PartialOrd for CommitId
impl StructuralPartialEq for CommitId
Auto Trait Implementations§
impl Freeze 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
Mutably borrows from an owned value. Read more