pub struct Standard<B: Block>(/* private fields */);Expand description
The standard variant of Marshal, which broadcasts complete blocks.
This variant sends the entire block to all peers.
Trait Implementations§
Source§impl<B, K> Buffer<Standard<B>> for Mailbox<K, B>
impl<B, K> Buffer<Standard<B>> for Mailbox<K, B>
Source§type CachedBlock = B
type CachedBlock = B
The cached block type held internally by the buffer. Read more
Source§async fn find_by_digest(&self, digest: B::Digest) -> Option<Self::CachedBlock>
async fn find_by_digest(&self, digest: B::Digest) -> Option<Self::CachedBlock>
Attempt to find a block by its digest. Read more
Source§async fn find_by_commitment(
&self,
commitment: B::Digest,
) -> Option<Self::CachedBlock>
async fn find_by_commitment( &self, commitment: B::Digest, ) -> Option<Self::CachedBlock>
Attempt to find a block by its commitment. Read more
Source§async fn subscribe_by_digest(
&self,
digest: B::Digest,
) -> Receiver<Self::CachedBlock>
async fn subscribe_by_digest( &self, digest: B::Digest, ) -> Receiver<Self::CachedBlock>
Subscribe to a block’s availability by its digest. Read more
Source§async fn subscribe_by_commitment(
&self,
commitment: B::Digest,
) -> Receiver<Self::CachedBlock>
async fn subscribe_by_commitment( &self, commitment: B::Digest, ) -> Receiver<Self::CachedBlock>
Subscribe to a block’s availability by its commitment. Read more
Source§async fn finalized(&self, _commitment: B::Digest)
async fn finalized(&self, _commitment: B::Digest)
Notify the buffer that a block has been finalized. Read more
Source§async fn send(&self, _round: Round, block: B, recipients: Recipients<K>)
async fn send(&self, _round: Round, block: B, recipients: Recipients<K>)
Send a block to peers.
Source§impl<B> Variant for Standard<B>where
B: Block,
impl<B> Variant for Standard<B>where
B: Block,
Source§type ApplicationBlock = B
type ApplicationBlock = B
The application block type.
Source§type Block = B
type Block = B
The working block type of marshal, supporting the consensus commitment. Read more
Source§type StoredBlock = B
type StoredBlock = B
The type of block stored in the archive. Read more
Source§type Commitment = <B as Digestible>::Digest
type Commitment = <B as Digestible>::Digest
The
Digest type used by consensus.Source§fn commitment(block: &Self::Block) -> Self::Commitment
fn commitment(block: &Self::Block) -> Self::Commitment
Computes the consensus commitment for a block. Read more
Source§fn commitment_to_inner(
commitment: Self::Commitment,
) -> <Self::Block as Digestible>::Digest
fn commitment_to_inner( commitment: Self::Commitment, ) -> <Self::Block as Digestible>::Digest
Extracts the block digest from a consensus commitment. Read more
Source§fn parent_commitment(block: &Self::Block) -> Self::Commitment
fn parent_commitment(block: &Self::Block) -> Self::Commitment
Returns the parent commitment referenced by
block.Source§fn into_inner(block: Self::Block) -> Self::ApplicationBlock
fn into_inner(block: Self::Block) -> Self::ApplicationBlock
Converts a working block to an application block. Read more
impl<B: Copy + Block> Copy for Standard<B>
Auto Trait Implementations§
impl<B> Freeze for Standard<B>
impl<B> RefUnwindSafe for Standard<B>where
B: RefUnwindSafe,
impl<B> Send for Standard<B>
impl<B> Sync for Standard<B>
impl<B> Unpin for Standard<B>where
B: Unpin,
impl<B> UnsafeUnpin for Standard<B>
impl<B> UnwindSafe for Standard<B>where
B: 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<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<B> IntoBlock<B> for B
impl<B> IntoBlock<B> for B
Source§fn into_block(self) -> B
fn into_block(self) -> B
Convert this cached block into the underlying block type.
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