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> 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