Enum git_hash::ObjectId [−][src]
Expand description
An owned hash identifying objects, most commonly Sha1
Variants
Implementations
Access and conversion
Return the raw mutable byte slice representing this hash
Write ourselves to out
in hexadecimal notation
Sha1 hash specific methods
Returns ourselves as slice of 20 bytes.
Panics if this instance is not a sha1 hash.
Return ourselves as array of 40 hexadecimal bytes.
Panics if this instance is not a sha1 hash.
Return ourselves as hexadecimal string with a length of 40 bytes.
Panics if this instance is not a sha1 hash.
Instantiate an Digest from a slice 20 borrowed bytes of a Sha1 digest.
Panics of the slice doesn’t have a length of 20.
Instantiate an Digest from a borrowed array of 20 bytes of a Sha1 digest.
Hash decoding
Methods from Deref<Target = oid>
The first byte of the hash, commonly used to partition a set of Id
s
Returns an array with a hexadecimal encoded version of the Sha1 hash this Id
represents.
Panics if this is not a Sha1 hash, as identifiable by ObjectId::kind()
.
Trait Implementations
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
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ObjectId
impl UnwindSafe for ObjectId
Blanket Implementations
Mutably borrows from an owned value. Read more