pub enum BannerMode {
Auto,
Full,
Compact,
Off,
}Expand description
How much of a snapshot to show.
Variants§
Auto
Decide from the terminal and from whether this snapshot says anything new.
Full
The whole box.
Compact
Two lines.
Off
Nothing.
Implementations§
Source§impl BannerMode
impl BannerMode
Sourcepub fn parse(word: &str) -> Option<Self>
pub fn parse(word: &str) -> Option<Self>
Parse a mode by name; None for a word that is not one.
use majordomus_cli::environment::render::BannerMode;
assert_eq!(BannerMode::parse("compact"), Some(BannerMode::Compact));
assert_eq!(BannerMode::parse("COMPACT"), Some(BannerMode::Compact));
assert_eq!(BannerMode::parse("loud"), None);Trait Implementations§
Source§impl Clone for BannerMode
impl Clone for BannerMode
Source§fn clone(&self) -> BannerMode
fn clone(&self) -> BannerMode
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 BannerMode
Source§impl Debug for BannerMode
impl Debug for BannerMode
Source§impl Default for BannerMode
impl Default for BannerMode
Source§fn default() -> BannerMode
fn default() -> BannerMode
Returns the “default value” for a type. Read more
impl Eq for BannerMode
Source§impl PartialEq for BannerMode
impl PartialEq for BannerMode
Source§fn eq(&self, other: &BannerMode) -> bool
fn eq(&self, other: &BannerMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BannerMode
Auto Trait Implementations§
impl Freeze for BannerMode
impl RefUnwindSafe for BannerMode
impl Send for BannerMode
impl Sync for BannerMode
impl Unpin for BannerMode
impl UnsafeUnpin for BannerMode
impl UnwindSafe for BannerMode
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.