pub struct Presentation {
pub colour: bool,
pub unicode: bool,
pub columns: usize,
pub interactive: bool,
}Expand description
What the terminal on the other end can take.
Fields§
§colour: boolWhether escape sequences may be used.
unicode: boolWhether characters outside ASCII may be used.
columns: usizeHow many columns there are.
interactive: boolWhether the output is going to a terminal at all.
Implementations§
Source§impl Presentation
impl Presentation
Sourcepub fn detect() -> Self
pub fn detect() -> Self
What this process’s standard error can take.
The banner goes to standard error, not standard output: standard output belongs to
whatever the caller is capturing, and a banner in the middle of majordomus env status --json | jq would be a bug in every consumer at once.
NO_COLOR — set to anything at all, including the empty string, per the
convention — turns colour off. So does CI, and so does a standard error that is
not a terminal.
Trait Implementations§
Source§impl Clone for Presentation
impl Clone for Presentation
Source§fn clone(&self) -> Presentation
fn clone(&self) -> Presentation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Presentation
Source§impl Debug for Presentation
impl Debug for Presentation
Source§impl Default for Presentation
impl Default for Presentation
impl Eq for Presentation
Source§impl PartialEq for Presentation
impl PartialEq for Presentation
Source§fn eq(&self, other: &Presentation) -> bool
fn eq(&self, other: &Presentation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Presentation
Auto Trait Implementations§
impl Freeze for Presentation
impl RefUnwindSafe for Presentation
impl Send for Presentation
impl Sync for Presentation
impl Unpin for Presentation
impl UnsafeUnpin for Presentation
impl UnwindSafe for Presentation
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.