[−][src]Struct bardecoder::util::qr::QRData
QR Data extracted from the source image
While the data is still pixels of value 0/255, using the index will convert it into 1's (pixel 0) and 0's (pixel 255)
Example
use bardecoder::util::qr::QRData; let mut data = vec![0; 21 * 21]; data[21 * 21 - 1] = 255; let qr_data = QRData::new(data, 1); assert_eq!(qr_data.version, 1); assert_eq!(qr_data.side, 21); assert_eq!(qr_data[[0, 0]], 1); assert_eq!(qr_data[[20, 20]], 0);
Fields
data: Vec<u8>QR Pixel Data in side x side pixels, stored in row major order. Using the provided index will convert into 1's and 0's.
version: u32Version of the QR Code, 1 being the smallest, 40 the largest
side: u32Side in pixels of the QR square
Methods
impl QRData[src]
pub fn new(data: Vec<u8>, version: u32) -> QRData[src]
Create a new QRData object with the provided data and version. side will be calculated automatically.
Trait Implementations
impl Debug for QRData[src]
impl Decode<QRData, QRError> for QRDecoder[src]
impl Extract<ImageBuffer<Luma<u8>, Vec<u8>>, QRLocation, QRData, QRError> for QRExtractor[src]
impl Index<[u32; 2]> for QRData[src]
Auto Trait Implementations
impl RefUnwindSafe for QRData
impl Send for QRData
impl Sync for QRData
impl Unpin for QRData
impl UnwindSafe for QRData
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,