pub trait FecCodec: Default + 'static {
const N: usize;
const K: usize;
// Required methods
fn encode(&self, info: &[u8], codeword: &mut [u8]);
fn decode_soft(&self, llr: &[f32], opts: &FecOpts<'_>) -> Option<FecResult>;
}Expand description
Forward-error-correction codec: maps K information bits ↔ N codeword
bits.
Implementors MUST be Default-constructible so generic pipeline code can
obtain an instance via P::Fec::default() without plumbing state.
Stateless codecs (matrices in const / static) are the common case.
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.