BoolTriboolExt

Trait BoolTriboolExt 

Source
pub trait BoolTriboolExt: TriboolExt<bool> {
    // Required methods
    fn get_or(&self, default: bool) -> bool;
    fn is_undef(&self) -> bool;
    fn get_str(&self) -> String;
}
Expand description

Extend Option with tribool-specific methods

Required Methods§

Source

fn get_or(&self, default: bool) -> bool

Get the boolean value with a default if undefined

§Arguments
  • default - The default value to use if undefined
§Returns

The boolean value or the default

Source

fn is_undef(&self) -> bool

Check if the tribool is undefined

§Returns

true if the value is None, false otherwise

Source

fn get_str(&self) -> String

Get the string representation of the tribool

§Returns

“true” if true, “false” if false, empty string if undefined

Implementations on Foreign Types§

Source§

impl BoolTriboolExt for Option<bool>

Source§

fn get_or(&self, default: bool) -> bool

Source§

fn is_undef(&self) -> bool

Source§

fn get_str(&self) -> String

Implementors§