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) -> OmaConsoleResult<()>
pub fn show_cursor(&self) -> OmaConsoleResult<()>
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_writer(&self) -> Box<dyn Write>
pub fn get_writer(&self) -> Box<dyn Write>
Get writer to write something to terminal
sourcepub fn writeln(
&self,
prefix: &str,
msg: &str,
is_pb: bool
) -> OmaConsoleResult<(Vec<String>, Vec<String>)>
pub fn writeln( &self, prefix: &str, msg: &str, is_pb: bool ) -> OmaConsoleResult<(Vec<String>, Vec<String>)>
Write oma-style string to terminal
sourcepub fn writeln_with_pb(
&self,
pb: &ProgressBar,
prefix: &str,
msg: &str
) -> OmaConsoleResult<()>
pub fn writeln_with_pb( &self, pb: &ProgressBar, prefix: &str, msg: &str ) -> OmaConsoleResult<()>
Write oma-style string to terminal with progress bar
pub fn writeln_with_mb( &self, mb: &MultiProgress, prefix: &str, msg: &str ) -> OmaConsoleResult<()>
pub fn write_chunks<S: AsRef<str>>( &self, prefix: &str, chunks: &[S], prefix_len: u16 ) -> OmaConsoleResult<()>
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