[][src]Enum qrcode::canvas::MaskPattern

pub enum MaskPattern {
    Checkerboard,
    HorizontalLines,
    VerticalLines,
    DiagonalLines,
    LargeCheckerboard,
    Fields,
    Diamonds,
    Meadow,
}

The mask patterns. Since QR code and Micro QR code do not use the same pattern number, we name them according to their shape instead of the number.

Variants

Checkerboard

QR code pattern 000: (x + y) % 2 == 0.

HorizontalLines

QR code pattern 001: y % 2 == 0.

VerticalLines

QR code pattern 010: x % 3 == 0.

DiagonalLines

QR code pattern 011: (x + y) % 3 == 0.

LargeCheckerboard

QR code pattern 100: ((x/3) + (y/2)) % 2 == 0.

Fields

QR code pattern 101: (x*y)%2 + (x*y)%3 == 0.

Diamonds

QR code pattern 110: ((x*y)%2 + (x*y)%3) % 2 == 0.

Meadow

QR code pattern 111: ((x+y)%2 + (x*y)%3) % 2 == 0.

Trait Implementations

impl Clone for MaskPattern[src]

impl Copy for MaskPattern[src]

impl Debug for MaskPattern[src]

Auto Trait Implementations

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> SetParameter for T

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.