pub struct Terminal { /* private fields */ }Expand description
Providing information about terminal
Implementations§
Source§impl Terminal
impl Terminal
pub fn new() -> Self
pub fn new_stdout() -> Self
pub fn with_max_len(&mut self, max_len: Option<u16>)
pub fn with_term(&mut self, term: Term)
pub fn with_prefix_len(&mut self, prefix_len: u16)
pub fn is_terminal(&self) -> bool
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
pub fn get_prefix_len(&self) -> u16
pub fn gen_prefix(&self, prefix: &str) -> String
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 width
Sourcepub fn get_writer(&self) -> Box<dyn Write>
pub fn get_writer(&self) -> Box<dyn Write>
Get writer to write something to terminal
pub fn wrap_content<'a>( &self, prefix: &'a str, msg: &str, ) -> Vec<(&'a str, String)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Terminal
impl RefUnwindSafe for Terminal
impl Send for Terminal
impl Sync for Terminal
impl Unpin for Terminal
impl UnwindSafe for Terminal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more