pub struct Writer { /* private fields */ }
Expand description
The writer that handles output to the VGA buffer, including cursor management and text color.
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn write_byte(&mut self, byte: u8)
pub fn write_byte(&mut self, byte: u8)
Writes a single byte to the screen, advancing the cursor position.
If the byte is a newline (\n
), a new line is started. Otherwise, the character
is written at the current cursor position.
§Arguments
byte
- The byte to write, typically an ASCII character.
Sourcepub fn write_string(&mut self, s: &str)
pub fn write_string(&mut self, s: &str)
Writes a string to the screen, character by character.
§Arguments
s
- The string to write to the screen.
Sourcepub fn clear_screen(&mut self)
pub fn clear_screen(&mut self)
Clears the entire screen and resets the cursor position to the top-left corner.
Sourcepub fn move_cursor_back(&mut self)
pub fn move_cursor_back(&mut self)
Moves the cursor back one character without wrapping.
Sourcepub fn update_cursor(&mut self)
pub fn update_cursor(&mut self)
Updates the hardware cursor to the current cursor position.