pub trait QrDecoder {
type Error;
// Required method
fn decode(
&self,
image: GrayPixels<'_>,
) -> Result<Vec<DecodedQrCode>, Self::Error>;
}Expand description
A QR code decoder: turns a grayscale image back into data.
Implement this for your own decoder (e.g. wrapping a native binding); use
the bundled RqrrDecoder (behind the rqrr feature) for the
rqrr crate.
decode returns a Vec because an image may contain more than one QR
code; the order is decoder-defined.
Required Associated Types§
Required Methods§
Sourcefn decode(
&self,
image: GrayPixels<'_>,
) -> Result<Vec<DecodedQrCode>, Self::Error>
fn decode( &self, image: GrayPixels<'_>, ) -> Result<Vec<DecodedQrCode>, Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".