pub enum ObjectKind {
Blob,
Tree,
Commit,
Tag,
}Expand description
The four Git object types.
Variants§
Blob
A raw file snapshot.
Tree
A directory listing.
Commit
A snapshot with metadata and parentage.
Tag
An annotated tag.
Implementations§
Source§impl ObjectKind
impl ObjectKind
Sourcepub fn from_bytes(b: &[u8]) -> Result<Self>
pub fn from_bytes(b: &[u8]) -> Result<Self>
Parse from the ASCII keyword used in Git object headers.
§Errors
Returns Error::UnknownObjectType for unrecognised strings.
Trait Implementations§
Source§impl Clone for ObjectKind
impl Clone for ObjectKind
Source§fn clone(&self) -> ObjectKind
fn clone(&self) -> ObjectKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectKind
impl Debug for ObjectKind
Source§impl Display for ObjectKind
impl Display for ObjectKind
Source§impl FromStr for ObjectKind
impl FromStr for ObjectKind
Source§impl PartialEq for ObjectKind
impl PartialEq for ObjectKind
impl Copy for ObjectKind
impl Eq for ObjectKind
impl StructuralPartialEq for ObjectKind
Auto Trait Implementations§
impl Freeze for ObjectKind
impl RefUnwindSafe for ObjectKind
impl Send for ObjectKind
impl Sync for ObjectKind
impl Unpin for ObjectKind
impl UnsafeUnpin for ObjectKind
impl UnwindSafe for ObjectKind
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