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 moresource§impl Debug for CodeParams
impl Debug for CodeParams
source§impl PartialEq<CodeParams> for CodeParams
impl PartialEq<CodeParams> for CodeParams
source§fn eq(&self, other: &CodeParams) -> bool
fn eq(&self, other: &CodeParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CodeParams
impl Eq for CodeParams
impl StructuralEq for CodeParams
impl StructuralPartialEq for CodeParams
Auto Trait Implementations§
impl RefUnwindSafe for CodeParams
impl Send for CodeParams
impl Sync for CodeParams
impl Unpin for CodeParams
impl UnwindSafe for CodeParams
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