pub enum TriBool {
Auto,
Yes,
No,
}
Expand description
This is an Option
Variants§
Implementations§
source§impl TriBool
impl TriBool
sourcepub fn unwrap_or_else<F>(self, f: F) -> boolwhere
F: FnOnce() -> bool,
pub fn unwrap_or_else<F>(self, f: F) -> boolwhere
F: FnOnce() -> bool,
Examples found in repository?
src/print.rs (line 87)
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
pub fn print_tree(
tree: &Tree,
screen: Screen,
panel_skin: &PanelSkin,
con: &AppContext,
) -> Result<CmdResult, ProgramError> {
// We write on stdout, but we must do it after app closing to have the normal terminal
let show_color = con.launch_args.color.unwrap_or_else(|| stdout().is_tty());
let styles = if show_color {
panel_skin.styles.clone()
} else {
StyleMap::no_term()
};
Ok(CmdResult::from(Launchable::tree_printer(
tree,
screen,
styles,
con.ext_colors.clone(),
)))
}
Trait Implementations§
source§impl PartialEq<TriBool> for TriBool
impl PartialEq<TriBool> for TriBool
source§impl ValueEnum for TriBool
impl ValueEnum for TriBool
source§fn value_variants<'a>() -> &'a [Self] ⓘ
fn value_variants<'a>() -> &'a [Self] ⓘ
All possible argument values, in display order.
source§fn to_possible_value<'a>(&self) -> Option<PossibleValue<'a>>
fn to_possible_value<'a>(&self) -> Option<PossibleValue<'a>>
The canonical argument value. Read more
impl Copy for TriBool
impl Eq for TriBool
impl StructuralEq for TriBool
impl StructuralPartialEq for TriBool
Auto Trait Implementations§
impl RefUnwindSafe for TriBool
impl Send for TriBool
impl Sync for TriBool
impl Unpin for TriBool
impl UnwindSafe for TriBool
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.