[][src]Struct quircs::Code

pub struct Code {
    pub corners: [Point; 4],
    pub size: i32,
    pub cell_bitmap: [u8; 3917],
}

This structure is used to return information about detected QR codes in the input image.

Fields

corners: [Point; 4]

The four corners of the QR-code, from top left, clockwise

size: i32

The number of cells across in the QR-code. The cell bitmap is a bitmask giving the actual values of cells. If the cell at (x, y) is black, then the following bit is set:

This example is not tested
    cell_bitmap[i >> 3] & (1 << (i & 7))

where i = (y * size) + x.

cell_bitmap: [u8; 3917]

Implementations

impl Code[src]

pub fn decode(&self) -> Result<Data, DecodeError>[src]

Decode a QR-code, returning the payload data.

impl Code[src]

pub fn clear(&mut self)[src]

Trait Implementations

impl Clone for Code[src]

impl Copy for Code[src]

impl Default for Code[src]

Auto Trait Implementations

impl RefUnwindSafe for Code

impl Send for Code

impl Sync for Code

impl Unpin for Code

impl UnwindSafe for Code

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.