pub struct DefaultRateEncoder<E: Engine>(/* private fields */);
Expand description
Reed-Solomon encoder using high or low rate as appropriate.
This is basically same as ReedSolomonEncoder
except with slightly different API which allows
specifying Engine
and EncoderWork
.
Trait Implementations§
Source§impl<E: Engine> RateEncoder<E> for DefaultRateEncoder<E>
impl<E: Engine> RateEncoder<E> for DefaultRateEncoder<E>
Source§type Rate = DefaultRate<E>
type Rate = DefaultRate<E>
Rate of this encoder.
Source§fn into_parts(self) -> (E, EncoderWork)
fn into_parts(self) -> (E, EncoderWork)
Consumes this encoder returning its
Engine
and EncoderWork
so that they can be re-used by another encoder.Source§fn new(
original_count: usize,
recovery_count: usize,
shard_bytes: usize,
engine: E,
work: Option<EncoderWork>,
) -> Result<Self, Error>
fn new( original_count: usize, recovery_count: usize, shard_bytes: usize, engine: E, work: Option<EncoderWork>, ) -> Result<Self, Error>
Like
ReedSolomonEncoder::new
with Engine
to use and optional working space to be re-used.Source§fn reset(
&mut self,
original_count: usize,
recovery_count: usize,
shard_bytes: usize,
) -> Result<(), Error>
fn reset( &mut self, original_count: usize, recovery_count: usize, shard_bytes: usize, ) -> Result<(), Error>
Auto Trait Implementations§
impl<E> Freeze for DefaultRateEncoder<E>where
E: Freeze,
impl<E> RefUnwindSafe for DefaultRateEncoder<E>where
E: RefUnwindSafe,
impl<E> Send for DefaultRateEncoder<E>where
E: Send,
impl<E> Sync for DefaultRateEncoder<E>where
E: Sync,
impl<E> Unpin for DefaultRateEncoder<E>where
E: Unpin,
impl<E> UnwindSafe for DefaultRateEncoder<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