Struct gix_config::Boolean
source · pub struct Boolean(pub bool);
Expand description
Any value that can be interpreted as a boolean.
Tuple Fields§
§0: bool
Implementations§
Trait Implementations§
source§impl Ord for Boolean
impl Ord for Boolean
source§impl PartialEq for Boolean
impl PartialEq for Boolean
source§impl PartialOrd for Boolean
impl PartialOrd 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.
impl Copy for Boolean
impl Eq for Boolean
impl StructuralEq for Boolean
impl StructuralPartialEq for Boolean
Auto Trait Implementations§
impl RefUnwindSafe for Boolean
impl Send for Boolean
impl Sync for Boolean
impl Unpin for Boolean
impl UnwindSafe for Boolean
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