Enum git2::ObjectType [] [src]

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]

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 Debug for ObjectType
[src]

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

Formats the value using the given formatter.

impl Clone for ObjectType
[src]

fn clone(&self) -> ObjectType

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Copy for ObjectType
[src]

impl Eq for ObjectType
[src]

impl PartialEq for ObjectType
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Display for ObjectType
[src]

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

Formats the value using the given formatter.