Enum qrcode::types::Color [] [src]

pub enum Color {
    Light,
    Dark,
}

The color of a module.

Variants

The module is light colored.

The module is dark colored.

Methods

impl Color
[src]

[src]

Selects a value according to color of the module. Equivalent to if self != Color::Light { dark } else { light }.

Examples

assert_eq!(Color::Light.select(1, 0), 0);
assert_eq!(Color::Dark.select("black", "white"), "black");

Trait Implementations

impl Copy for Color
[src]

impl Clone for Color
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Color
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for Color
[src]

impl Hash for Color
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Color
[src]

[src]

Formats the value using the given formatter. Read more

impl Not for Color
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl From<Module> for Color
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Color

impl Sync for Color