pub trait Decoder {
// Required methods
fn kind(&self) -> SymbologyKind;
fn decode(&self, modules: &BitMatrix) -> Result<String>;
}Expand description
Recovers a payload from a module grid.
The mirror of Symbology: an encoder turns a payload into a
BitMatrix, a decoder turns one back.
Scanner works against this trait rather than
against a concrete symbology, which is what keeps the scanning side of the
crate on the same seam as the rendering side.
Required Methods§
Sourcefn kind(&self) -> SymbologyKind
fn kind(&self) -> SymbologyKind
Which symbology this decodes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".