Enum git_object::mutable::Object[][src]

pub enum Object {
    Tree(Tree),
    Blob(Blob),
    Commit(Commit),
    Tag(Tag),
}

A mutable object representing Trees, Blobs, Commits or Tags.

Variants

Tree(Tree)
Blob(Blob)
Commit(Commit)
Tag(Tag)

Implementations

impl Object[src]

Convenient extraction of typed object.

pub fn as_blob(&self) -> Option<&Blob>[src]

Returns a Blob if it is one.

pub fn as_commit(&self) -> Option<&Commit>[src]

Returns a Commit if it is one.

pub fn as_tree(&self) -> Option<&Tree>[src]

Returns a Tree if it is one.

pub fn as_tag(&self) -> Option<&Tag>[src]

Returns a Tag if it is one.

pub fn kind(&self) -> Kind[src]

Returns the kind of object stored in this instance.

impl Object[src]

Serialization

pub fn write_to(&self, out: impl Write) -> Result<()>[src]

Write the contained object to out in the git serialization format.

Trait Implementations

impl Clone for Object[src]

impl Debug for Object[src]

impl<'de> Deserialize<'de> for Object[src]

impl Eq for Object[src]

impl From<Blob> for Object[src]

impl From<Commit> for Object[src]

impl<'a> From<Object<'a>> for Object[src]

impl From<Tag> for Object[src]

impl From<Tree> for Object[src]

impl Hash for Object[src]

impl Ord for Object[src]

impl PartialEq<Object> for Object[src]

impl PartialOrd<Object> for Object[src]

impl Serialize for Object[src]

impl StructuralEq for Object[src]

impl StructuralPartialEq for Object[src]

impl TryFrom<Object> for Tag[src]

type Error = Object

The type returned in the event of a conversion error.

impl TryFrom<Object> for Commit[src]

type Error = Object

The type returned in the event of a conversion error.

impl TryFrom<Object> for Tree[src]

type Error = Object

The type returned in the event of a conversion error.

impl TryFrom<Object> for Blob[src]

type Error = Object

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Object

impl Send for Object

impl Sync for Object

impl Unpin for Object

impl UnwindSafe for Object

Blanket Implementations

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

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

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

impl<T> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.