Struct fuel_core_sync::state::State
source · pub struct State { /* private fields */ }
Expand description
State of the sync service.
The state takes evidence and produces a status.
Implementations§
source§impl State
impl State
sourcepub fn new(
committed: impl Into<Option<u32>>,
observed: impl Into<Option<u32>>,
) -> Self
pub fn new( committed: impl Into<Option<u32>>, observed: impl Into<Option<u32>>, ) -> Self
Create a new state from the current committed and observed heights.
sourcepub fn process_range(&self) -> Option<RangeInclusive<u32>>
pub fn process_range(&self) -> Option<RangeInclusive<u32>>
Get the current range to process.
sourcepub fn failed_to_process(&mut self, range: RangeInclusive<u32>)
pub fn failed_to_process(&mut self, range: RangeInclusive<u32>)
Record that a range of blocks have failed to process.
Trait Implementations§
source§impl PartialEq for State
impl PartialEq for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations§
source§impl<T> AnyDebug for T
impl<T> AnyDebug for T
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.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<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<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