pub enum Update<B: Block, A: Acknowledgement = Exact> {
Tip(u64, B::Commitment),
Block(B, A),
}Expand description
An update reported to the application, either a new finalized tip or a finalized block.
Finalized tips are reported as soon as known, whether or not we hold all blocks up to that height. Finalized blocks are reported to the application in monotonically increasing order (no gaps permitted).
Variants§
Tip(u64, B::Commitment)
A new finalized tip.
Block(B, A)
A new finalized block and an Acknowledgement for the application to signal once processed.
To ensure all blocks are delivered at least once, marshal waits to mark a block as delivered until the application explicitly acknowledges the update. If the Acknowledgement is dropped before handling, marshal will exit (assuming the application is shutting down).
Because the Acknowledgement is clonable, the application can pass Update to multiple consumers (and marshal will only consider the block delivered once all consumers have acknowledged it).
Trait Implementations§
Source§impl<B: Clone + Block, A: Clone + Acknowledgement> Clone for Update<B, A>where
B::Commitment: Clone,
impl<B: Clone + Block, A: Clone + Acknowledgement> Clone for Update<B, A>where
B::Commitment: Clone,
Auto Trait Implementations§
impl<B, A> Freeze for Update<B, A>
impl<B, A> RefUnwindSafe for Update<B, A>
impl<B, A> Send for Update<B, A>
impl<B, A> Sync for Update<B, A>
impl<B, A> Unpin for Update<B, A>
impl<B, A> UnwindSafe for Update<B, A>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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