Struct console::TermFeatures
source · pub struct TermFeatures<'a>(/* private fields */);
Expand description
Gives access to the terminal features.
Implementations§
source§impl<'a> TermFeatures<'a>
impl<'a> TermFeatures<'a>
sourcepub fn is_attended(&self) -> bool
pub fn is_attended(&self) -> bool
Check if this is a real user attended terminal (isatty
)
sourcepub fn colors_supported(&self) -> bool
pub fn colors_supported(&self) -> bool
Check 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
Check 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
Check if this terminal wants emojis.
sourcepub fn family(&self) -> TermFamily
pub fn family(&self) -> TermFamily
Return the family of the terminal.
Trait Implementations§
source§impl<'a> Clone for TermFeatures<'a>
impl<'a> Clone for TermFeatures<'a>
source§fn clone(&self) -> TermFeatures<'a>
fn clone(&self) -> TermFeatures<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for TermFeatures<'a>
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§
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)