pub struct BitImage(_);
Expand description

A 5×5 image supporting only two levels of brightness (on and off).

Uses 5 bytes of storage.

For display, each pixel is treated as having brightness either 0 or MAX_BRIGHTNESS.

Implementations

Constructs a BitImage from an array of brightnesses.

The data should be an array of 5 rows (top first), each of which is an array of 5 values (left first). Each value should be either 0 or 1.

Example
const HEART: BitImage = BitImage::new(&[
    [0, 1, 0, 1, 0],
    [1, 0, 1, 0, 1],
    [1, 0, 0, 0, 1],
    [0, 1, 0, 1, 0],
    [0, 0, 1, 0, 0],
]);

Returns a new blank BitImage.

All pixel values are 0.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the brightness value for a single LED. Read more

Returns the brightness value for a single LED. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.

Performs the conversion.

Casts the value.

OverflowingCasts the value.

Should always be Self

Casts the value.

Casts the value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

UnwrappedCasts the value.

Casts the value.

WrappingCasts the value.