pub struct DynamicPixelDisplay<T: Pixel> { /* private fields */ }Implementations§
Source§impl<T: Pixel> DynamicPixelDisplay<T>
impl<T: Pixel> DynamicPixelDisplay<T>
Sourcepub fn new(width: usize, height: usize, fill: T::U) -> Self
pub fn new(width: usize, height: usize, fill: T::U) -> Self
Convenience method to build a blank display struct with specified dimensions.
§Panics
This function panics if the data generated from the fill does not match the dimensions of the display. This should not happen and is subject to change in the future.
Trait Implementations§
Source§impl<S: Pixel> DynamicCanvas<S> for DynamicPixelDisplay<S>
impl<S: Pixel> DynamicCanvas<S> for DynamicPixelDisplay<S>
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> DynamicConsoleDisplay<T> for DynamicPixelDisplay<T>
impl<T: Pixel> DynamicConsoleDisplay<T> for DynamicPixelDisplay<T>
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> DynamicWidget for DynamicPixelDisplay<T>
impl<T: Pixel> DynamicWidget for DynamicPixelDisplay<T>
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.
Auto Trait Implementations§
impl<T> Freeze for DynamicPixelDisplay<T>
impl<T> RefUnwindSafe for DynamicPixelDisplay<T>where
T: RefUnwindSafe,
impl<T> Send for DynamicPixelDisplay<T>where
T: Send,
impl<T> Sync for DynamicPixelDisplay<T>where
T: Sync,
impl<T> Unpin for DynamicPixelDisplay<T>
impl<T> UnwindSafe for DynamicPixelDisplay<T>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