[][src]Struct git_object::borrowed::Commit

pub struct Commit<'a> {
    pub tree: &'a BStr,
    pub parents: SmallVec<[&'a BStr; 1]>,
    pub author: Signature<'a>,
    pub committer: Signature<'a>,
    pub encoding: Option<&'a BStr>,
    pub message: &'a BStr,
    pub extra_headers: Vec<(&'a BStr, Cow<'a, BStr>)>,
}

Fields

tree: &'a BStrparents: SmallVec<[&'a BStr; 1]>

HEX SHA1 of each parent commit. Empty for first commit in repository.

author: Signature<'a>committer: Signature<'a>encoding: Option<&'a BStr>

The name of the message encoding, otherwise UTF-8 should be assumed.

message: &'a BStrextra_headers: Vec<(&'a BStr, Cow<'a, BStr>)>

Extra header fields, either single line or multi-line.

Implementations

impl<'a> Commit<'a>[src]

pub fn tree(&self) -> Id[src]

pub fn from_bytes(d: &'a [u8]) -> Result<Commit<'a>, Error>[src]

pub fn extra_headers(
    &self
) -> ExtraHeaders<impl Iterator<Item = (&BStr, &BStr)>>
[src]

Trait Implementations

impl<'a> Clone for Commit<'a>[src]

impl<'a> Debug for Commit<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for Commit<'a>[src]

impl<'a> Eq for Commit<'a>[src]

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

impl<'a> Hash for Commit<'a>[src]

impl<'_> Into<Commit> for Commit<'_>[src]

impl<'a> Ord for Commit<'a>[src]

impl<'a> PartialEq<Commit<'a>> for Commit<'a>[src]

impl<'a> PartialOrd<Commit<'a>> for Commit<'a>[src]

impl<'a> Serialize for Commit<'a>[src]

impl<'a> StructuralEq for Commit<'a>[src]

impl<'a> StructuralPartialEq for Commit<'a>[src]

impl<'a> TryFrom<Object<'a>> for Commit<'a>[src]

type Error = Object<'a>

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Commit<'a>

impl<'a> Send for Commit<'a>

impl<'a> Sync for Commit<'a>

impl<'a> Unpin for Commit<'a>

impl<'a> UnwindSafe for Commit<'a>

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.