[][src]Enum git2::ObjectType

pub enum ObjectType {
    Any,
    Commit,
    Tree,
    Blob,
    Tag,
}

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

Methods

impl ObjectType[src]

pub fn str(&self) -> &'static str[src]

Convert an object type to its string representation.

pub fn is_loose(&self) -> bool[src]

Determine if the given git_object_t is a valid loose object type.

pub fn from_raw(raw: git_object_t) -> Option<ObjectType>[src]

Convert a raw git_object_t to an ObjectType

pub fn raw(&self) -> git_object_t[src]

Convert this kind into its raw representation

pub fn from_str(s: &str) -> Option<ObjectType>[src]

Convert a string object type representation to its object type.

Trait Implementations

impl Clone for ObjectType[src]

impl Copy for ObjectType[src]

impl Eq for ObjectType[src]

impl PartialEq<ObjectType> for ObjectType[src]

impl Display for ObjectType[src]

impl Debug for ObjectType[src]

impl StructuralPartialEq for ObjectType[src]

impl StructuralEq for ObjectType[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]