pub struct BooleanDefaultTrue(pub Option<bool>);Expand description
Boolean that defaults to true when None.
A newtype around Option<bool> that dereferences to true when the inner
value is None or Some(true). Serializes transparently as Option<bool>
on the wire and in JSON.
Tuple Fields§
§0: Option<bool>Implementations§
Trait Implementations§
Source§impl Clone for BooleanDefaultTrue
impl Clone for BooleanDefaultTrue
Source§fn clone(&self) -> BooleanDefaultTrue
fn clone(&self) -> BooleanDefaultTrue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BooleanDefaultTrue
impl Debug for BooleanDefaultTrue
Source§impl Default for BooleanDefaultTrue
impl Default for BooleanDefaultTrue
Source§impl Deref for BooleanDefaultTrue
impl Deref for BooleanDefaultTrue
Source§impl From<BooleanDefaultTrue> for Option<bool>
impl From<BooleanDefaultTrue> for Option<bool>
Source§fn from(v: BooleanDefaultTrue) -> Self
fn from(v: BooleanDefaultTrue) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BooleanDefaultTrue
impl PartialEq for BooleanDefaultTrue
impl StructuralPartialEq for BooleanDefaultTrue
Auto Trait Implementations§
impl Freeze for BooleanDefaultTrue
impl RefUnwindSafe for BooleanDefaultTrue
impl Send for BooleanDefaultTrue
impl Sync for BooleanDefaultTrue
impl Unpin for BooleanDefaultTrue
impl UnsafeUnpin for BooleanDefaultTrue
impl UnwindSafe for BooleanDefaultTrue
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