pub struct TerminalCapabilities { /* private fields */ }Expand description
Terminal display features that are safe to use without an active probe.
Implementations§
Source§impl TerminalCapabilities
impl TerminalCapabilities
Sourcepub fn detect(reduced_motion: bool) -> Self
pub fn detect(reduced_motion: bool) -> Self
Detects conservative capabilities from the process environment.
Sourcepub fn from_environment(
terminal: Option<&str>,
color_terminal: Option<&str>,
no_color: bool,
reduced_motion: bool,
) -> Self
pub fn from_environment( terminal: Option<&str>, color_terminal: Option<&str>, no_color: bool, reduced_motion: bool, ) -> Self
Resolves capabilities from explicit environment values for deterministic callers and tests.
Sourcepub const fn color(self) -> ColorCapability
pub const fn color(self) -> ColorCapability
Returns the selected safe color palette.
Sourcepub const fn reduced_motion(self) -> bool
pub const fn reduced_motion(self) -> bool
Returns whether animated visual affordances should remain still.
Sourcepub const fn supports_synchronized_output(self) -> bool
pub const fn supports_synchronized_output(self) -> bool
Returns whether synchronized output is safe for this terminal class.
Sourcepub const fn supports_focus_events(self) -> bool
pub const fn supports_focus_events(self) -> bool
Returns whether focus notifications are safe for this terminal class.
Sourcepub const fn supports_title(self) -> bool
pub const fn supports_title(self) -> bool
Returns whether guarded terminal-title ownership is safe for this terminal class.
Sourcepub const fn supports_hyperlinks(self) -> bool
pub const fn supports_hyperlinks(self) -> bool
Returns whether guarded OSC8 output is safe for this terminal class.
Trait Implementations§
Source§impl Clone for TerminalCapabilities
impl Clone for TerminalCapabilities
impl Copy for TerminalCapabilities
Source§impl Debug for TerminalCapabilities
impl Debug for TerminalCapabilities
impl Eq for TerminalCapabilities
Source§impl PartialEq for TerminalCapabilities
impl PartialEq for TerminalCapabilities
impl StructuralPartialEq for TerminalCapabilities
Auto Trait Implementations§
impl Freeze for TerminalCapabilities
impl RefUnwindSafe for TerminalCapabilities
impl Send for TerminalCapabilities
impl Sync for TerminalCapabilities
impl Unpin for TerminalCapabilities
impl UnsafeUnpin for TerminalCapabilities
impl UnwindSafe for TerminalCapabilities
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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