Struct oma_console::writer::Writer
source · pub struct Writer { /* private fields */ }Implementations§
source§impl Writer
impl Writer
pub fn new(prefix_len: u16) -> Self
sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
See environment is terminal
sourcepub fn show_cursor(&self) -> Result<()>
pub fn show_cursor(&self) -> Result<()>
Show terminal cursor
sourcepub fn get_max_len(&self) -> u16
pub fn get_max_len(&self) -> u16
Get terminal max len to writer message to terminal
sourcepub fn get_height(&self) -> u16
pub fn get_height(&self) -> u16
Get terminal height
sourcepub fn get_length(&self) -> u16
pub fn get_length(&self) -> u16
Get terminal height
sourcepub fn get_writer(&self) -> Box<dyn Write>
pub fn get_writer(&self) -> Box<dyn Write>
Get writer to write something to terminal
sourcepub fn write_prefix(&self, prefix: &str) -> Result<()>
pub fn write_prefix(&self, prefix: &str) -> Result<()>
Write oma-style message prefix to terminal
sourcepub fn writeln(&self, prefix: &str, msg: &str) -> Result<()>
pub fn writeln(&self, prefix: &str, msg: &str) -> Result<()>
Write oma-style string to terminal
pub fn write_chunks<S: AsRef<str>>( &self, prefix: &str, chunks: &[S], prefix_len: u16 ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnwindSafe for Writer
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