pub struct ObjectId(/* private fields */);Expand description
A 20-byte SHA-1 object identifier.
Implementations§
Source§impl ObjectId
impl ObjectId
Sourcepub fn from_bytes(bytes: [u8; 20]) -> Self
pub fn from_bytes(bytes: [u8; 20]) -> Self
Creates an ObjectId from raw bytes.
Sourcepub fn hash_object(object_type: ObjectType, data: &[u8]) -> Self
pub fn hash_object(object_type: ObjectType, data: &[u8]) -> Self
Computes the SHA-1 hash of data with a git object header.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ObjectId
impl<'de> Deserialize<'de> for ObjectId
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ObjectId
impl Eq for ObjectId
impl StructuralPartialEq for ObjectId
Auto Trait Implementations§
impl Freeze for ObjectId
impl RefUnwindSafe for ObjectId
impl Send for ObjectId
impl Sync for ObjectId
impl Unpin for ObjectId
impl UnwindSafe for ObjectId
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.