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
A person who authored the content of the commit.
Fields
§
signature: SignatureRef<'a>
Committer
A person who committed the authors work to the repository.
Fields
§
signature: SignatureRef<'a>
Encoding(&'a BStr)
ExtraHeader((&'a BStr, Cow<'a, BStr>))
Message(&'a BStr)
Implementations§
Source§impl Token<'_>
impl Token<'_>
Sourcepub fn id(&self) -> Option<&oid>
pub fn id(&self) -> Option<&oid>
Return the object id of this token if it’s 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 it’s a tree or a parent commit.
Trait Implementations§
Source§impl<'a> Ord for Token<'a>
impl<'a> Ord for Token<'a>
Source§impl<'a> PartialOrd for Token<'a>
impl<'a> PartialOrd for Token<'a>
impl<'a> Eq for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more