pub struct ForkProgress {
pub count: u64,
pub last_start: Option<i128>,
pub body: Option<String>,
pub windows: Vec<(i128, Option<i128>)>,
pub conflict: Option<ForkConflict>,
pub failure: Option<ForkFailure>,
}Expand description
Where a fork check stands after the first embodiments of a history, so a
long history is checked one segment at a time with bounded memory. The
history must be in validFrom order (the order a history is recorded
in); for such a history the verdict after the last segment is the one
check_no_fork gives for the whole list, conflict included.
The bookkeeping: while no fork has been seen, every window still open at
the latest start is on one body (two such windows on different bodies
would overlap). windows keeps, for that body, the points where the
latest end so far grows: (start, latest end up to that start), with
None for an open end. A later window on another body forks exactly
when some kept window that starts before its end also ends after its
start.
Fields§
§count: u64Embodiments checked so far.
last_start: Option<i128>The latest validFrom seen, in nanoseconds.
body: Option<String>The body every open window is on.
windows: Vec<(i128, Option<i128>)>(start, latest end) steps for body, oldest first.
conflict: Option<ForkConflict>The first fork, as check_no_fork reports it.
failure: Option<ForkFailure>A failure that is not a fork.
Implementations§
Source§impl ForkProgress
impl ForkProgress
pub fn start() -> Self
Sourcepub fn result(&self) -> (bool, Option<ForkConflict>, Option<String>)
pub fn result(&self) -> (bool, Option<ForkConflict>, Option<String>)
The verdict over every embodiment checked so far: (ok, conflict)
as check_no_fork gives it, plus a reason when not ok.
Trait Implementations§
Source§impl Clone for ForkProgress
impl Clone for ForkProgress
Source§impl Debug for ForkProgress
impl Debug for ForkProgress
Source§impl Default for ForkProgress
impl Default for ForkProgress
impl Eq for ForkProgress
Source§impl PartialEq for ForkProgress
impl PartialEq for ForkProgress
impl StructuralPartialEq for ForkProgress
Auto Trait Implementations§
impl Forget for ForkProgress
impl Freeze for ForkProgress
impl Move for ForkProgress
impl RefUnwindSafe for ForkProgress
impl Send for ForkProgresswhere
RawVecInner: Send,
impl Sync for ForkProgresswhere
RawVecInner: Sync,
impl Unpin for ForkProgress
impl UnsafeUnpin for ForkProgresswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(i128, Option<i128>)>: UnsafeUnpin,
impl UnwindSafe for ForkProgresswhere
RawVecInner: 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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.