pub struct Diff<T> {
pub patch: Patch<T>,
pub checkpoint: CommitProof,
pub last_commit: Option<CommitHash>,
}Expand description
Diff between local and remote.
Fields§
§patch: Patch<T>Contents of the patch.
checkpoint: CommitProofCheckpoint for the diff patch.
For checked patches this must match the proof of HEAD before the patch was created.
For unchecked force merges this checkpoint references the commit proof of HEAD after applying the patch.
last_commit: Option<CommitHash>Last commit hash before the patch was created.
This can be used to determine if the patch is to be used to initialize a new set of events when no last commit is available.
For example, for file event logs which are lazily instantiated once external files are created.
Implementations§
Source§impl<T> Diff<T>
impl<T> Diff<T>
Sourcepub fn new(
patch: Patch<T>,
checkpoint: CommitProof,
last_commit: Option<CommitHash>,
) -> Diff<T>
pub fn new( patch: Patch<T>, checkpoint: CommitProof, last_commit: Option<CommitHash>, ) -> Diff<T>
Create a diff.
Trait Implementations§
impl<T> Eq for Diff<T>where
T: Eq,
impl<T> StructuralPartialEq for Diff<T>
Auto Trait Implementations§
impl<T> Freeze for Diff<T>
impl<T> RefUnwindSafe for Diff<T>where
T: RefUnwindSafe,
impl<T> Send for Diff<T>where
T: Send,
impl<T> Sync for Diff<T>where
T: Sync,
impl<T> Unpin for Diff<T>where
T: Unpin,
impl<T> UnwindSafe for Diff<T>where
T: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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