Struct console::TermFeatures
source · [−]pub struct TermFeatures<'a>(_);
Expand description
Gives access to the terminal features.
Implementations
sourceimpl<'a> TermFeatures<'a>
impl<'a> TermFeatures<'a>
sourcepub fn is_attended(&self) -> bool
pub fn is_attended(&self) -> bool
Checks if this is a real user attended terminal (isatty
)
sourcepub fn colors_supported(&self) -> bool
pub fn colors_supported(&self) -> bool
Checks if colors are supported by this terminal.
This does not check if colors are enabled. Currently all terminals are considered to support colors
sourcepub fn is_msys_tty(&self) -> bool
pub fn is_msys_tty(&self) -> bool
Checks if this terminal is an msys terminal.
This is sometimes useful to disable features that are known to not work on msys terminals or require special handling.
sourcepub fn wants_emoji(&self) -> bool
pub fn wants_emoji(&self) -> bool
Checks if this terminal wants emojis.
sourcepub fn family(&self) -> TermFamily
pub fn family(&self) -> TermFamily
Returns the family of the terminal.
Trait Implementations
sourceimpl<'a> Clone for TermFeatures<'a>
impl<'a> Clone for TermFeatures<'a>
sourcefn clone(&self) -> TermFeatures<'a>
fn clone(&self) -> TermFeatures<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for TermFeatures<'a>
impl<'a> Send for TermFeatures<'a>
impl<'a> Sync for TermFeatures<'a>
impl<'a> Unpin for TermFeatures<'a>
impl<'a> UnwindSafe for TermFeatures<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more