pub trait DecoderInstance {
// Required methods
fn new(hypergraph: &DecodingHypergraph, config: &Value) -> Self;
fn decode(
&mut self,
request: DecodeRequest<'_>,
) -> Result<ParityFactor, DecodeError>;
fn reset(&mut self);
// Provided methods
fn supported_features(_config: &Value) -> DecoderFeatures { ... }
fn validate_hypergraph(
_hypergraph: &DecodingHypergraph,
_config: &Value,
) -> Result<(), String> { ... }
}Required Methods§
fn new(hypergraph: &DecodingHypergraph, config: &Value) -> Self
fn decode( &mut self, request: DecodeRequest<'_>, ) -> Result<ParityFactor, DecodeError>
fn reset(&mut self)
Provided Methods§
fn supported_features(_config: &Value) -> DecoderFeatures
Sourcefn validate_hypergraph(
_hypergraph: &DecodingHypergraph,
_config: &Value,
) -> Result<(), String>
fn validate_hypergraph( _hypergraph: &DecodingHypergraph, _config: &Value, ) -> Result<(), String>
Validates constraints imposed by a specific decoder backend. Runs before common validation and must handle structurally invalid input.
§Errors
Returns an error when the hypergraph cannot be represented by the backend.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".