pub enum DistributionShard<C: Scheme> {
Strong(C::StrongShard),
Weak(C::WeakShard),
}Expand description
A shard of erasure coded data, either a strong shard (from the proposer) or a weak shard (from a non-proposer).
A weak shard cannot be checked for validity on its own.
Variants§
Strong(C::StrongShard)
A shard that is broadcasted by the proposer, containing extra information for generating checking data.
Weak(C::WeakShard)
A shard that is broadcasted by a non-proposer, containing only the shard data.
Trait Implementations§
Source§impl<C: Clone + Scheme> Clone for DistributionShard<C>
impl<C: Clone + Scheme> Clone for DistributionShard<C>
Source§fn clone(&self) -> DistributionShard<C>
fn clone(&self) -> DistributionShard<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Scheme> EncodeSize for DistributionShard<C>
impl<C: Scheme> EncodeSize for DistributionShard<C>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl<C: Scheme> PartialEq for DistributionShard<C>
impl<C: Scheme> PartialEq for DistributionShard<C>
Source§impl<C: Scheme> Read for DistributionShard<C>
impl<C: Scheme> Read for DistributionShard<C>
Source§type Cfg = CodecConfig
type Cfg = CodecConfig
The
Cfg type parameter allows passing configuration during the read process. This is
crucial for safely decoding untrusted data, for example, by providing size limits for
collections or strings. Read moreSource§impl<C: Scheme> Write for DistributionShard<C>
impl<C: Scheme> Write for DistributionShard<C>
impl<C: Scheme> Eq for DistributionShard<C>
Auto Trait Implementations§
impl<C> Freeze for DistributionShard<C>
impl<C> RefUnwindSafe for DistributionShard<C>
impl<C> Send for DistributionShard<C>
impl<C> Sync for DistributionShard<C>
impl<C> Unpin for DistributionShard<C>
impl<C> UnsafeUnpin for DistributionShard<C>
impl<C> UnwindSafe for DistributionShard<C>
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> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> EncodeExt for Twhere
T: EncodeSize + Write,
impl<T> EncodeExt for Twhere
T: EncodeSize + Write,
Source§fn encode_with_pool_mut(&self, pool: &BufferPool) -> IoBufMut
fn encode_with_pool_mut(&self, pool: &BufferPool) -> IoBufMut
Source§fn encode_with_pool(&self, pool: &BufferPool) -> IoBuf
fn encode_with_pool(&self, pool: &BufferPool) -> IoBuf
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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