logo
pub struct MockDisplay<C>(_)
where
    C: PixelColor
;
Expand description

Mock display struct

See the module documentation for usage and examples.

Implementations

Creates a new empty mock display.

Returns the width of the display.

Returns the height of the display.

Returns the color of a pixel.

Changes the color of a pixel.

Creates a new mock display from a character pattern.

The color pattern is specified by a slice of string slices. Each string slice represents a row of pixels and every character a single pixel.

A space character in the pattern represents a pixel which wasn’t modified by any drawing routine and is left in the default state. All other characters are converted by implementations of the ColorMapping trait.

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 “default value” for a type. Read more

Error type to return when a drawing operation fails. Read more

Draws a pixel on the display.

Returns the dimensions of the DrawTarget in pixels.

Draws an object from an iterator over its pixels.

Clears the display with the supplied color. Read more

Draws a styled line primitive. Read more

Draws a styled triangle primitive. Read more

Draws a styled rectangle primitive. Read more

Draws a styled circle primitive. Read more

Draws an image with known size Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

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.