pub enum GitHashKind {
Sha1,
Sha256,
}Expand description
Which hash a repository’s object ids use. gunnar defaults to sha256 (D11); sha1 stays supported.
Variants§
Implementations§
Source§impl GitHashKind
impl GitHashKind
Sourcepub fn from_hex_len(len: usize) -> Option<Self>
pub fn from_hex_len(len: usize) -> Option<Self>
Infer the hash from a hex oid’s length. None for anything else.
pub fn code(self) -> u8
pub fn from_code(c: u8) -> Option<Self>
Sourcepub fn oid_of(self, canonical_bytes: &[u8]) -> Vec<u8> ⓘ
pub fn oid_of(self, canonical_bytes: &[u8]) -> Vec<u8> ⓘ
The object id of these canonical bytes.
Sourcepub fn oid_hex_of(self, canonical_bytes: &[u8]) -> String
pub fn oid_hex_of(self, canonical_bytes: &[u8]) -> String
The hex object id of these canonical bytes.
Trait Implementations§
Source§impl Clone for GitHashKind
impl Clone for GitHashKind
Source§fn clone(&self) -> GitHashKind
fn clone(&self) -> GitHashKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GitHashKind
Source§impl Debug for GitHashKind
impl Debug for GitHashKind
impl Eq for GitHashKind
Source§impl PartialEq for GitHashKind
impl PartialEq for GitHashKind
impl StructuralPartialEq for GitHashKind
Auto Trait Implementations§
impl Freeze for GitHashKind
impl RefUnwindSafe for GitHashKind
impl Send for GitHashKind
impl Sync for GitHashKind
impl Unpin for GitHashKind
impl UnsafeUnpin for GitHashKind
impl UnwindSafe for GitHashKind
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.