pub struct DefaultRate<E: Engine>(/* private fields */);Expand description
Reed-Solomon encoder/decoder generator using high or low rate as appropriate.
Trait Implementations§
Source§impl<E: Engine> Rate<E> for DefaultRate<E>
impl<E: Engine> Rate<E> for DefaultRate<E>
Source§type RateEncoder = DefaultRateEncoder<E>
type RateEncoder = DefaultRateEncoder<E>
Encoder of this rate.
Source§type RateDecoder = DefaultRateDecoder<E>
type RateDecoder = DefaultRateDecoder<E>
Decoder of this rate.
Source§fn supports(original_count: usize, recovery_count: usize) -> bool
fn supports(original_count: usize, recovery_count: usize) -> bool
Returns
true if given original_count / recovery_count
combination is supported.Source§fn encoder(
original_count: usize,
recovery_count: usize,
shard_bytes: usize,
engine: E,
work: Option<EncoderWork>,
) -> Result<Self::RateEncoder, Error>
fn encoder( original_count: usize, recovery_count: usize, shard_bytes: usize, engine: E, work: Option<EncoderWork>, ) -> Result<Self::RateEncoder, Error>
Creates new encoder. This is same as
RateEncoder::new.Source§fn decoder(
original_count: usize,
recovery_count: usize,
shard_bytes: usize,
engine: E,
work: Option<DecoderWork>,
) -> Result<Self::RateDecoder, Error>
fn decoder( original_count: usize, recovery_count: usize, shard_bytes: usize, engine: E, work: Option<DecoderWork>, ) -> Result<Self::RateDecoder, Error>
Creates new decoder. This is same as
RateDecoder::new.Auto Trait Implementations§
impl<E> Freeze for DefaultRate<E>
impl<E> RefUnwindSafe for DefaultRate<E>where
E: RefUnwindSafe,
impl<E> Send for DefaultRate<E>where
E: Send,
impl<E> Sync for DefaultRate<E>where
E: Sync,
impl<E> Unpin for DefaultRate<E>where
E: Unpin,
impl<E> UnsafeUnpin for DefaultRate<E>
impl<E> UnwindSafe for DefaultRate<E>where
E: 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> 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