pub enum Message<B, C, H, P>{
Proposed {
block: CodedBlock<B, C, H>,
round: Round,
},
Discovered {
commitment: Commitment,
leader: P,
round: Round,
},
GetByCommitment {
commitment: Commitment,
response: Sender<Option<Arc<CodedBlock<B, C, H>>>>,
},
GetByDigest {
digest: B::Digest,
response: Sender<Option<Arc<CodedBlock<B, C, H>>>>,
},
SubscribeShard {
commitment: Commitment,
response: Sender<()>,
},
SubscribeByCommitment {
commitment: Commitment,
response: Sender<Arc<CodedBlock<B, C, H>>>,
},
SubscribeByDigest {
digest: B::Digest,
response: Sender<Arc<CodedBlock<B, C, H>>>,
},
Prune {
through: Commitment,
},
}Expand description
A message that can be sent to the coding Engine.
Variants§
Proposed
A request to broadcast a proposed CodedBlock to all peers.
Fields
block: CodedBlock<B, C, H>The erasure coded block.
Discovered
A notification from consensus that a Commitment has been discovered.
Fields
commitment: CommitmentThe Commitment of the proposed block.
leader: PThe leader’s public key.
GetByCommitment
A request to get a reconstructed block, if available.
Fields
commitment: CommitmentThe Commitment of the block to get.
response: Sender<Option<Arc<CodedBlock<B, C, H>>>>The response channel.
GetByDigest
A request to get a reconstructed block by its digest, if available.
Fields
response: Sender<Option<Arc<CodedBlock<B, C, H>>>>The response channel.
SubscribeShard
A request to open a subscription for the receipt of our valid shard from the leader.
SubscribeByCommitment
A request to open a subscription for the reconstruction of a CodedBlock
by its Commitment.
Fields
commitment: CommitmentThe block’s digest.
response: Sender<Arc<CodedBlock<B, C, H>>>The response channel.
SubscribeByDigest
A request to open a subscription for the reconstruction of a CodedBlock
by its digest.
Fields
response: Sender<Arc<CodedBlock<B, C, H>>>The response channel.
Prune
A request to prune all caches at and below the given commitment.
Fields
through: CommitmentInclusive prune target Commitment.
Auto Trait Implementations§
impl<B, C, H, P> Freeze for Message<B, C, H, P>
impl<B, C, H, P> !RefUnwindSafe for Message<B, C, H, P>
impl<B, C, H, P> Send for Message<B, C, H, P>
impl<B, C, H, P> Sync for Message<B, C, H, P>
impl<B, C, H, P> Unpin for Message<B, C, H, P>where
P: Unpin,
<B as Digestible>::Digest: Unpin,
B: Unpin,
<C as Scheme>::Commitment: Unpin,
H: Unpin,
<C as Scheme>::StrongShard: Unpin,
impl<B, C, H, P> UnsafeUnpin for Message<B, C, H, P>where
P: UnsafeUnpin,
<B as Digestible>::Digest: UnsafeUnpin,
B: UnsafeUnpin,
<C as Scheme>::Commitment: UnsafeUnpin,
impl<B, C, H, P> !UnwindSafe for Message<B, C, H, P>
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> 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