Enum git2::ObjectType
source · pub enum ObjectType {
Any,
Commit,
Tree,
Blob,
Tag,
}
Expand description
An enumeration all possible kinds objects may have.
Variants§
Any
Any kind of git object
Commit
An object which corresponds to a git commit
Tree
An object which corresponds to a git tree
Blob
An object which corresponds to a git blob
Tag
An object which corresponds to a git tag
Implementations§
source§impl ObjectType
impl ObjectType
sourcepub fn is_loose(&self) -> bool
pub fn is_loose(&self) -> bool
Determine if the given git_object_t is a valid loose object type.
sourcepub fn from_raw(raw: git_object_t) -> Option<ObjectType>
pub fn from_raw(raw: git_object_t) -> Option<ObjectType>
Convert a raw git_object_t to an ObjectType
sourcepub fn raw(&self) -> git_object_t
pub fn raw(&self) -> git_object_t
Convert this kind into its raw representation
sourcepub fn from_str(s: &str) -> Option<ObjectType>
pub fn from_str(s: &str) -> Option<ObjectType>
Convert a string object type representation to its object type.
Trait Implementations§
source§impl Clone for ObjectType
impl Clone for ObjectType
source§fn clone(&self) -> ObjectType
fn clone(&self) -> ObjectType
Returns a copy 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 ObjectType
impl Debug for ObjectType
source§impl Display for ObjectType
impl Display for ObjectType
source§impl PartialEq for ObjectType
impl PartialEq for ObjectType
source§fn eq(&self, other: &ObjectType) -> bool
fn eq(&self, other: &ObjectType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ObjectType
impl Eq for ObjectType
impl StructuralPartialEq for ObjectType
Auto Trait Implementations§
impl RefUnwindSafe for ObjectType
impl Send for ObjectType
impl Sync for ObjectType
impl Unpin for ObjectType
impl UnwindSafe for ObjectType
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