Enum git_object::commit::ref_iter::Token
source · pub enum Token<'a> {
Tree {
id: ObjectId,
},
Parent {
id: ObjectId,
},
Author {
signature: SignatureRef<'a>,
},
Committer {
signature: SignatureRef<'a>,
},
Encoding(&'a BStr),
ExtraHeader((&'a BStr, Cow<'a, BStr>)),
Message(&'a BStr),
}
Expand description
A token returned by the commit iterator.
Variants§
Tree
Parent
Author
Fields
§
signature: SignatureRef<'a>
A person who authored the content of the commit.
Committer
Fields
§
signature: SignatureRef<'a>
A person who committed the authors work to the repository.
Encoding(&'a BStr)
ExtraHeader((&'a BStr, Cow<'a, BStr>))
Message(&'a BStr)
Implementations§
source§impl<'a> Token<'a>
impl<'a> Token<'a>
sourcepub fn id(&self) -> Option<&oid>
pub fn id(&self) -> Option<&oid>
Return the object id of this token if its a tree or a parent commit.
sourcepub fn try_into_id(self) -> Option<ObjectId>
pub fn try_into_id(self) -> Option<ObjectId>
Return the owned object id of this token if its a tree or a parent commit.
Trait Implementations§
source§impl<'a> Ord for Token<'a>
impl<'a> Ord for Token<'a>
source§impl<'a> PartialEq<Token<'a>> for Token<'a>
impl<'a> PartialEq<Token<'a>> for Token<'a>
source§impl<'a> PartialOrd<Token<'a>> for Token<'a>
impl<'a> PartialOrd<Token<'a>> for Token<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more