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
sourceimpl 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
sourceimpl Clone for ObjectType
impl Clone for ObjectType
sourcefn clone(&self) -> ObjectType
fn clone(&self) -> ObjectType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ObjectType
impl Debug for ObjectType
sourceimpl Display for ObjectType
impl Display for ObjectType
sourceimpl PartialEq<ObjectType> for ObjectType
impl PartialEq<ObjectType> for ObjectType
impl Copy for ObjectType
impl Eq for ObjectType
impl StructuralEq 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
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
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