pub struct CommitFields<'a> {
pub branch_name: &'a str,
pub parent_hash: Option<&'a Hash>,
pub merge_parent_hash: Option<&'a Hash>,
pub manifest_hash: &'a Hash,
pub author: &'a str,
pub message: Option<&'a str>,
pub timestamp: &'a DateTime<Utc>,
pub files: &'a [FileChange],
}Expand description
Everything a commit hash is derived from. Borrowed view over
crate::Commit’s fields so Commit::with_timestamp can hash before
constructing the struct.
Fields§
§branch_name: &'a str§parent_hash: Option<&'a Hash>§merge_parent_hash: Option<&'a Hash>§manifest_hash: &'a Hash§message: Option<&'a str>§timestamp: &'a DateTime<Utc>§files: &'a [FileChange]Hashed under v2 only; v1 ignores it (its historical weakness).
Trait Implementations§
Source§impl<'a> Clone for CommitFields<'a>
impl<'a> Clone for CommitFields<'a>
impl<'a> Copy for CommitFields<'a>
Auto Trait Implementations§
impl<'a> Forget for CommitFields<'a>
impl<'a> Freeze for CommitFields<'a>
impl<'a> Move for CommitFields<'a>
impl<'a> RefUnwindSafe for CommitFields<'a>
impl<'a> Send for CommitFields<'a>
impl<'a> Sync for CommitFields<'a>
impl<'a> Unpin for CommitFields<'a>
impl<'a> UnsafeUnpin for CommitFields<'a>
impl<'a> UnwindSafe for CommitFields<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more