Struct TermFeatures

pub struct TermFeatures<'a>(/* private field */);

Gives access to the terminal features.

Implementations

impl TermFeatures<'_>

fn is_attended(&self) -> bool

Check if this is a real user attended terminal (isatty)

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

fn true_colors_supported(&self) -> bool

Check if true colors are supported by this terminal.

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.

fn wants_emoji(&self) -> bool

Check if this terminal wants emojis.

fn family(&self) -> TermFamily

Return the family of the terminal.

Trait Implementations

impl<'a> Clone for TermFeatures<'a>

fn clone(&self) -> Self

impl<'a> Debug for TermFeatures<'a>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto 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> UnsafeUnpin for TermFeatures<'a>

impl<'a> UnwindSafe for TermFeatures<'a>

Blanket Implementations

impl<T> Any for TermFeatures<'a> where T: 'static + ?Sized,

impl<T> Borrow<T> for TermFeatures<'a> where T: ?Sized,

impl<T> BorrowMut<T> for TermFeatures<'a> where T: ?Sized,

impl<T> CloneToUninit for TermFeatures<'a> where T: Clone,

impl<T> From<T> for TermFeatures<'a>

impl<T> ToOwned for TermFeatures<'a> where T: Clone,

impl<T, U> Into<U> for TermFeatures<'a> where U: From<T>,

impl<T, U> TryFrom<U> for TermFeatures<'a> where U: Into<T>,

impl<T, U> TryInto<U> for TermFeatures<'a> where U: TryFrom<T>,