[][src]Trait vga_framebuffer::AsciiConsole

pub trait AsciiConsole: BaseConsole {
    fn write_char_at(
        &mut self,
        ch: u8,
        pos: Position
    ) -> Result<(), Self::Error>;
fn handle_escape(&mut self, escaped_char: u8) -> bool; default fn write_string(&mut self, s: &[u8]) -> Result<(), Self::Error> { ... }
default fn write_character(&mut self, ch: u8) -> Result<(), Self::Error> { ... }
default fn write_string_at(
        &mut self,
        s: &[u8],
        pos: Position
    ) -> Result<(), Self::Error> { ... }
default fn is_special(&self, ch: u8) -> Option<SpecialChar> { ... } }

Refinement of BaseConsole which supports 8-bit characters. Use this is you are implementing an old-fashioned ASCII console (including extended ASCII, like Code Page 850, or ISO 8859-1).

Required methods

fn write_char_at(&mut self, ch: u8, pos: Position) -> Result<(), Self::Error>

Write a single 8-bit char to the screen at the given position without updating the current position.

fn handle_escape(&mut self, escaped_char: u8) -> bool

Called when they've used an escape character in the string. Currently you can only escape a single byte. The escape character is 0x1B. This function returns 'true' when the escape sequence is complete.

Loading content...

Provided methods

default fn write_string(&mut self, s: &[u8]) -> Result<(), Self::Error>

Write an 8-bit string to the screen at the given position. Updates the current position to the end of the string. Strings will wrap across the end of the screen and scroll the screen if they reach the bottom.

default fn write_character(&mut self, ch: u8) -> Result<(), Self::Error>

Write a single 8-bit char to the screen at the current position.

default fn write_string_at(
    &mut self,
    s: &[u8],
    pos: Position
) -> Result<(), Self::Error>

Write an 8-bit string to the screen at the given position. Updates the current position to the end of the string. Strings will wrap across the end of the screen and scroll the screen if they reach the bottom.

default fn is_special(&self, ch: u8) -> Option<SpecialChar>

Check if an 8-bit char is special

Loading content...

Implementors

impl<'a, T> AsciiConsole for FrameBuffer<'a, T> where
    T: Hardware
[src]

fn handle_escape(&mut self, escaped_char: u8) -> bool[src]

Handle an escape char. We take a, b, c, d, e, f, g, h as being a background colour and A..H as being a foreground colour. 'Z' means clear the screen.

fn write_char_at(&mut self, ch: u8, pos: Position) -> Result<(), Self::Error>[src]

Write a single Unicode char to the screen at the given position without updating the current position.

default fn write_string(&mut self, s: &[u8]) -> Result<(), Self::Error>[src]

default fn write_character(&mut self, ch: u8) -> Result<(), Self::Error>[src]

default fn write_string_at(
    &mut self,
    s: &[u8],
    pos: Position
) -> Result<(), Self::Error>
[src]

default fn is_special(&self, ch: u8) -> Option<SpecialChar>[src]

Loading content...