Struct git_meta::GitCommitMeta[][src]

pub struct GitCommitMeta {
    pub id: String,
    pub message: Option<String>,
    pub timestamp: Option<DateTime<Utc>>,
}

GitCommitMeta holds basic info about a single commit

Fields

id: String

The SHA-1 hash of the commit

message: Option<String>

The commit message of the commit

timestamp: Option<DateTime<Utc>>

The timestamp of the commit in Utc

Implementations

impl GitCommitMeta[src]

pub fn new<I: ToHex + AsRef<[u8]>>(id: I) -> GitCommitMeta[src]

Trait bound for id is to convert the output from: git2::Commit.id().as_bytes() into a String

pub fn with_timestamp(self, time: i64) -> Self[src]

time is intended to convert output from: git2::Commit.time().seconds() into Datetime<Utc>

pub fn with_message(self, msg: Option<String>) -> Self[src]

Set the commit message

Trait Implementations

impl Clone for GitCommitMeta[src]

impl Debug for GitCommitMeta[src]

impl PartialEq<GitCommitMeta> for GitCommitMeta[src]

impl StructuralPartialEq for GitCommitMeta[src]

Auto Trait Implementations

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> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<D> OwoColorize for D

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.