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<ObjectType> for ObjectType
impl PartialEq<ObjectType> 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 ==
.