pub struct StaticPixelDisplay<T: Pixel, const WIDTH: usize, const HEIGHT: usize> { /* private fields */ }Expand description
Represents a console display with a width and height in pixels.
Implementations§
Trait Implementations§
Source§impl<S: Pixel, const WIDTH: usize, const HEIGHT: usize> DynamicCanvas<S> for StaticPixelDisplay<S, WIDTH, HEIGHT>
impl<S: Pixel, const WIDTH: usize, const HEIGHT: usize> DynamicCanvas<S> for StaticPixelDisplay<S, WIDTH, HEIGHT>
type A = usize
Source§fn pixel(&self, x: Self::A, y: Self::A) -> Result<S::U, String>
fn pixel(&self, x: Self::A, y: Self::A) -> Result<S::U, String>
Returns a bool representing the state of the pixel at the specified coordinate. Read more
Source§impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> DynamicConsoleDisplay<T> for StaticPixelDisplay<T, WIDTH, HEIGHT>
impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> DynamicConsoleDisplay<T> for StaticPixelDisplay<T, WIDTH, HEIGHT>
Source§fn width(&self) -> usize
fn width(&self) -> usize
Returns the width of the display in a display specific, individually addressable unit (e.g. pixels, characters).
Source§fn height(&self) -> usize
fn height(&self) -> usize
Returns the height of the display in a display specific, individually addressable unit (e.g. pixels, characters).
fn data(&self) -> &[T]
fn data_mut(&mut self) -> &mut Box<[T]>
Source§impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> DynamicWidget for StaticPixelDisplay<T, WIDTH, HEIGHT>
impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> DynamicWidget for StaticPixelDisplay<T, WIDTH, HEIGHT>
Source§fn width_characters(&self) -> usize
fn width_characters(&self) -> usize
Returns the width of the display in characters.
Source§fn height_characters(&self) -> usize
fn height_characters(&self) -> usize
Returns the height of the display in characters.
Source§fn string_data(&self) -> StringData
fn string_data(&self) -> StringData
Returns a string representation.
The first vector contains rows.
The vectors inside/rows contain individual characters.
Source§impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> StaticConsoleDisplay<T> for StaticPixelDisplay<T, WIDTH, HEIGHT>
impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> StaticConsoleDisplay<T> for StaticPixelDisplay<T, WIDTH, HEIGHT>
Source§impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> StaticWidget for StaticPixelDisplay<T, WIDTH, HEIGHT>
impl<T: Pixel, const WIDTH: usize, const HEIGHT: usize> StaticWidget for StaticPixelDisplay<T, WIDTH, HEIGHT>
Source§const WIDTH_CHARACTERS: usize
const WIDTH_CHARACTERS: usize
Width of the display in characters.
Source§const HEIGHT_CHARACTERS: usize
const HEIGHT_CHARACTERS: usize
Height of the display in characters.
Auto Trait Implementations§
impl<T, const WIDTH: usize, const HEIGHT: usize> Freeze for StaticPixelDisplay<T, WIDTH, HEIGHT>
impl<T, const WIDTH: usize, const HEIGHT: usize> RefUnwindSafe for StaticPixelDisplay<T, WIDTH, HEIGHT>where
T: RefUnwindSafe,
impl<T, const WIDTH: usize, const HEIGHT: usize> Send for StaticPixelDisplay<T, WIDTH, HEIGHT>where
T: Send,
impl<T, const WIDTH: usize, const HEIGHT: usize> Sync for StaticPixelDisplay<T, WIDTH, HEIGHT>where
T: Sync,
impl<T, const WIDTH: usize, const HEIGHT: usize> Unpin for StaticPixelDisplay<T, WIDTH, HEIGHT>
impl<T, const WIDTH: usize, const HEIGHT: usize> UnwindSafe for StaticPixelDisplay<T, WIDTH, HEIGHT>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more