Trait DecoderFactory

Source
pub trait DecoderFactory:
    Display
    + Clone
    + Sync
    + Send
    + 'static {
    // Required method
    fn build_decoder(&self, h: SparseMatrix) -> Box<dyn LdpcDecoder>;
}
Expand description

Decoder factory.

This trait is implemented by DecoderImplementation, which builds a suitable decoder depending on the value of an enum. Other factories can be implemented by the user in order to run a BER test with an LDPC decoder implemented externally to ldpc-toolbox (such decoder must be wrapped as a Box <dyn LdpcDecoder>).

Required Methods§

Source

fn build_decoder(&self, h: SparseMatrix) -> Box<dyn LdpcDecoder>

Builds and LDPC decoder.

Given a parity check matrix, this function builds an LDPC decoder corresponding to this decoder implementation.

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.

Implementors§