pub trait TextDisplay {
// Required methods
fn write_char(
&self,
pos: (u32, u32),
char: u8,
color: Color,
) -> Result<(), Error<'static>>;
fn get_size(&self) -> (u32, u32);
}
Expand description
Some form of display that can be written to with text.
Required Methods§
Sourcefn write_char(
&self,
pos: (u32, u32),
char: u8,
color: Color,
) -> Result<(), Error<'static>>
fn write_char( &self, pos: (u32, u32), char: u8, color: Color, ) -> Result<(), Error<'static>>
Writes a single character to the specified position.
Implementations§
Source§impl dyn TextDisplay + '_
impl dyn TextDisplay + '_
Sourcepub fn clear_screen(&self, color: Color)
pub fn clear_screen(&self, color: Color)
Clears the screen.
Sourcepub fn write_str(
&self,
pos: (u32, u32),
str: &str,
color: Color,
) -> Result<(u32, u32), Error<'static>>
pub fn write_str( &self, pos: (u32, u32), str: &str, color: Color, ) -> Result<(u32, u32), Error<'static>>
Writes a &str to the screen.
Sourcepub fn write_bytes(
&self,
pos: (u32, u32),
str: &[u8],
color: Color,
) -> Result<(u32, u32), Error<'static>>
pub fn write_bytes( &self, pos: (u32, u32), str: &[u8], color: Color, ) -> Result<(u32, u32), Error<'static>>
Writes a &[u8] to the screen.