Struct git_repository::Id
source · [−]pub struct Id<'r> { /* private fields */ }
Expand description
An ObjectId with access to a repository.
Implementations
Methods from Deref<Target = oid>
sourcepub fn first_byte(&self) -> u8
pub fn first_byte(&self) -> u8
The first byte of the hash, commonly used to partition a set of Id
s
sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Interpret this object id as raw byte slice.
sourcepub fn to_hex_with_len(&self, len: usize) -> HexDisplay<'_>
pub fn to_hex_with_len(&self, len: usize) -> HexDisplay<'_>
Return a type which can display itself in hexadecimal form with the len
amount of characters.
Trait Implementations
sourceimpl<'repo> PartialEq<DetachedObject> for Id<'repo>
impl<'repo> PartialEq<DetachedObject> for Id<'repo>
sourceimpl<'a> PartialOrd<Id<'a>> for Id<'a>
impl<'a> PartialOrd<Id<'a>> for Id<'a>
sourcefn partial_cmp(&self, other: &Id<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &Id<'a>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl<'r> Copy for Id<'r>
Auto Trait Implementations
impl<'r> !RefUnwindSafe for Id<'r>
impl<'r> !Send for Id<'r>
impl<'r> !Sync for Id<'r>
impl<'r> Unpin for Id<'r>
impl<'r> !UnwindSafe for Id<'r>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more