pub struct Oid(/* private fields */);Expand description
Serializable git2::Oid
Implementations§
Source§impl Oid
impl Oid
pub fn from_str_ext(s: &str, format: ObjectFormat) -> Result<Self, Error>
Methods from Deref<Target = Oid>§
pub const ZERO_SHA1: Oid
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
View this OID as a byte-slice in its logical length: 20 bytes for SHA1, 32 bytes for SHA256.
Sourcepub fn object_format(&self) -> ObjectFormat
pub fn object_format(&self) -> ObjectFormat
Returns the ObjectFormat of this OID.
Without the unstable-sha256 feature, this always returns
ObjectFormat::Sha1.
Trait Implementations§
impl Copy for Oid
impl Eq for Oid
Source§impl Ord for Oid
impl Ord for Oid
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
Source§impl PartialOrd for Oid
impl PartialOrd for Oid
impl StructuralPartialEq for Oid
Auto Trait Implementations§
impl Freeze for Oid
impl RefUnwindSafe for Oid
impl Send for Oid
impl Sync for Oid
impl Unpin for Oid
impl UnsafeUnpin for Oid
impl UnwindSafe for Oid
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