pub struct OptionBool(pub Option<bool>);
Expand description
Shim type because we can’t do a specialised implementation for Option<bool>
directly.
Tuple Fields§
§0: Option<bool>
Trait Implementations§
Source§impl Clone for OptionBool
impl Clone for OptionBool
Source§fn clone(&self) -> OptionBool
fn clone(&self) -> OptionBool
Returns a copy 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 OptionBool
impl Debug for OptionBool
Source§impl Decode for OptionBool
impl Decode for OptionBool
Source§fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I: Input>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>
fn decode_into<I: Input>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl Encode for OptionBool
impl Encode for OptionBool
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encode_to<T: Output + ?Sized>(&self, dest: &mut T)
fn encode_to<T: Output + ?Sized>(&self, dest: &mut T)
Convert self to a slice and append it to the destination.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl PartialEq for OptionBool
impl PartialEq for OptionBool
impl Copy for OptionBool
impl DecodeWithMemTracking for OptionBool
impl EncodeLike for OptionBool
impl Eq for OptionBool
impl StructuralPartialEq for OptionBool
Auto Trait Implementations§
impl Freeze for OptionBool
impl RefUnwindSafe for OptionBool
impl Send for OptionBool
impl Sync for OptionBool
impl Unpin for OptionBool
impl UnwindSafe for OptionBool
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