Struct git_config::Boolean
source · pub struct Boolean(pub bool);Expand description
Any value that can be interpreted as a boolean.
Tuple Fields§
§0: boolImplementations§
Trait Implementations§
source§impl Ord for Boolean
impl Ord for Boolean
source§impl PartialEq<Boolean> for Boolean
impl PartialEq<Boolean> for Boolean
source§impl PartialOrd<Boolean> for Boolean
impl PartialOrd<Boolean> for Boolean
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for Boolean
Available on crate feature serde only.
impl Serialize for Boolean
Available on crate feature
serde only.source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<&BStr> for Boolean
impl TryFrom<&BStr> for Boolean
Warning
The direct usage of try_from("string") is discouraged as it will produce the wrong result for values
obtained from core.bool-implicit-true, which have no separator and are implicitly true.
This method chooses to work correctly for core.bool-empty=, which is an empty string and resolves
to being false.
Instead of this, obtain booleans with config.boolean(…), which handles the case were no separator is
present correctly.