pub struct CommitId(/* private fields */);
Expand description
Identifier for a Commit
based on its content. When a commit is
rewritten, its CommitId
changes.
Implementations§
source§impl CommitId
impl CommitId
pub fn new(value: Vec<u8>) -> Self
pub fn from_bytes(bytes: &[u8]) -> Self
sourcepub fn from_hex(hex: &'static str) -> Self
pub fn from_hex(hex: &'static str) -> Self
Parses the given hex string into an ObjectId.
The given string must be valid. A static str is required to prevent API misuse.
sourcepub fn try_from_hex(hex: &str) -> Result<Self, FromHexError>
pub fn try_from_hex(hex: &str) -> Result<Self, FromHexError>
Parses the given hex string into an ObjectId.
Trait Implementations§
source§impl ContentHash for CommitId
impl ContentHash for CommitId
source§impl Ord for CommitId
impl Ord for CommitId
source§impl PartialEq for CommitId
impl PartialEq for CommitId
source§impl PartialOrd for CommitId
impl PartialOrd for CommitId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq 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 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