pub struct TerminalWriter { /* private fields */ }Expand description
Allows logging text to a pixel-based framebuffer.
Implementations§
Source§impl TerminalWriter
impl TerminalWriter
Sourcepub fn new(buffer: &'static mut [u8], info: FrameBufferInfo) -> Self
pub fn new(buffer: &'static mut [u8], info: FrameBufferInfo) -> Self
Creates a new logger that uses the given framebuffer.
pub fn newline(&mut self)
pub fn carriage_return(&mut self)
pub fn width(&self) -> usize
pub fn height(&self) -> usize
Sourcepub fn write_char(&mut self, c: char)
pub fn write_char(&mut self, c: char)
Writes a single char to the framebuffer. Takes care of special control characters, such as newlines and carriage returns.
Sourcepub fn write_rendered_char(&mut self, rendered_char: RasterizedChar)
pub fn write_rendered_char(&mut self, rendered_char: RasterizedChar)
Prints a rendered char into the framebuffer.
Updates self.xpos.
pub fn write_pixel(&mut self, x: usize, y: usize, intensity: u8)
Trait Implementations§
Source§impl Write for TerminalWriter
impl Write for TerminalWriter
impl Send for TerminalWriter
impl Sync for TerminalWriter
Auto Trait Implementations§
impl Freeze for TerminalWriter
impl RefUnwindSafe for TerminalWriter
impl Unpin for TerminalWriter
impl !UnwindSafe for TerminalWriter
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