[go: up one dir, main page]

Struct rustsec::repository::git::Commit[][src]

pub struct Commit {
    pub commit_id: String,
    pub author: String,
    pub summary: String,
    pub timestamp: SystemTime,
    pub signature: Option<Signature>,
    // some fields omitted
}

Information about a commit to the Git repository

Fields

commit_id: String

ID (i.e. SHA-1 hash) of the latest commit

author: String

Information about the author of a commit

summary: String

Summary message for the commit

timestamp: SystemTime

Commit time in number of seconds since the UNIX epoch

signature: Option<Signature>

Signature on the commit (mandatory for Repository::fetch)

Implementations

impl Commit[src]

pub fn is_fresh(&self) -> bool[src]

Is the commit timestamp “fresh” as in the database has been updated recently? (i.e. 90 days, per the STALE_AFTER constant)

pub fn raw_signed_bytes(&self) -> Option<&[u8]>[src]

Get the raw bytes to be verified when verifying a commit signature

Trait Implementations

impl Debug for Commit[src]

Auto Trait Implementations

impl RefUnwindSafe for Commit

impl Send for Commit

impl Sync for Commit

impl Unpin for Commit

impl UnwindSafe for Commit

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

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

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.