Enum git2::ObjectType [] [src]

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

An enumeration all possible kinds objects may have.

Variants

Any

An object which corresponds to a any 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

fn str(&self) -> &'static str

Convert an object type to its string representation.

fn is_loose(&self) -> bool

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

fn from_raw(raw: git_otype) -> Option<ObjectType>

Convert a raw git_otype to an ObjectType

fn raw(&self) -> git_otype

Convert this kind into its raw representation

fn from_str(s: &str) -> Option<ObjectType>

Convert a string object type representation to its object type.

Trait Implementations

impl Display for ObjectType

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Debug for ObjectType

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for ObjectType

fn clone(&self) -> ObjectType

fn clone_from(&mut self, source: &Self)

impl Copy for ObjectType

impl Eq for ObjectType

impl PartialEq for ObjectType

fn eq(&self, __arg_0: &ObjectType) -> bool

fn ne(&self, __arg_0: &ObjectType) -> bool