pub struct Console { /* private fields */ }Expand description
The object of console.
Implementations§
Source§impl Console
impl Console
pub fn init() -> Self
Sourcepub fn print_char(&mut self, c: u8)
pub fn print_char(&mut self, c: u8)
Print a char to framebuffer console.
Note that the character must discovorable in ASCII, otherwise we don’t know what unexpected thing is being happened.
Sourcepub fn print_string(&mut self, s: &str)
pub fn print_string(&mut self, s: &str)
Print a string to console.
Sourcepub fn set_fg_color(&mut self, color: Color)
pub fn set_fg_color(&mut self, color: Color)
Set up the color of foreground character.
Sourcepub fn set_bg_color(&mut self, color: Color)
pub fn set_bg_color(&mut self, color: Color)
Set up the color of background character.
Sourcepub fn get_fg_color(&self) -> Color
pub fn get_fg_color(&self) -> Color
Get the color of foreground character.
Sourcepub fn get_bg_color(&self) -> Color
pub fn get_bg_color(&self) -> Color
Get the color of background character.
pub fn handle_cursor_up(&mut self)
pub fn handle_cursor_down(&mut self)
pub fn handle_cursor_left(&mut self)
pub fn handle_cursor_right(&mut self)
Trait Implementations§
Source§impl Write for Console
impl Write for Console
impl Send for Console
impl Sync for Console
Auto Trait Implementations§
impl Freeze for Console
impl RefUnwindSafe for Console
impl Unpin for Console
impl UnwindSafe for Console
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