Struct reed_solomon_novelpoly::CodeParams
source · pub struct CodeParams { /* private fields */ }
Expand description
Params for the encoder / decoder derived from a target validator count.
Implementations§
source§impl CodeParams
impl CodeParams
sourcepub fn derive_parameters(n: usize, k: usize) -> Result<Self>
pub fn derive_parameters(n: usize, k: usize) -> Result<Self>
Create a new reed solomon erasure encoding wrapper
k
the intended number of data shards needed to recover.
n
the intended number of resulting shards.
Assures that the derived paramters retain at most the given coding
rate, and as such assure recoverability with at least an equiv fraction
as provided by the input n
, and k
parameterset.
pub fn make_encoder(&self) -> ReedSolomon
Trait Implementations§
source§impl Clone for CodeParams
impl Clone for CodeParams
source§fn clone(&self) -> CodeParams
fn clone(&self) -> CodeParams
Returns a copy 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 more