Trait reed_solomon_16::rate::RateEncoder[][src]

pub trait RateEncoder<E: Engine> where
    Self: Sized
{ type Rate: Rate<E>; fn add_original_shard<T: AsRef<[u8]>>(
        &mut self,
        original_shard: T
    ) -> Result<(), Error>;
fn encode(&mut self) -> Result<EncoderResult<'_>, Error>;
fn into_parts(self) -> (E, EncoderWork);
fn new(
        original_count: usize,
        recovery_count: usize,
        shard_bytes: usize,
        engine: E,
        work: Option<EncoderWork>
    ) -> Result<Self, Error>;
fn reset(
        &mut self,
        original_count: usize,
        recovery_count: usize,
        shard_bytes: usize
    ) -> Result<(), Error>; fn supports(original_count: usize, recovery_count: usize) -> bool { ... }
fn validate(
        original_count: usize,
        recovery_count: usize,
        shard_bytes: usize
    ) -> Result<(), Error> { ... } }
Expand description

Reed-Solomon encoder using specific rate.

Associated Types

Rate of this encoder.

Required methods

Consumes this encoder returning its Engine and EncoderWork so that they can be re-used by another encoder.

Like ReedSolomonEncoder::new with Engine to use and optional working space to be re-used.

Provided methods

Returns true if given original_count / recovery_count combination is supported.

This is same as Rate::supports.

Returns Ok(()) if given original_count / recovery_count combination is supported and given shard_bytes is valid.

This is same as Rate::validate.

Implementors