Struct parity_scale_codec::OptionBool
source · [−]Expand description
Shim type because we can’t do a specialised implementation for Option<bool>
directly.
Tuple Fields
0: Option<bool>
Trait Implementations
sourceimpl Clone for OptionBool
impl Clone for OptionBool
sourcefn clone(&self) -> OptionBool
fn clone(&self) -> OptionBool
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OptionBool
impl Debug for OptionBool
sourceimpl Decode for OptionBool
impl Decode for OptionBool
sourcefn 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.
sourcefn skip<I: Input>(input: &mut I) -> Result<(), Error>
fn skip<I: Input>(input: &mut I) -> Result<(), Error>
Attempt to skip the encoded value from input. Read more
sourcefn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
sourceimpl Encode for OptionBool
impl Encode for OptionBool
sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
sourcefn 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.
sourcefn 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.
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Convert self to an owned vector.
sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
sourceimpl PartialEq<OptionBool> for OptionBool
impl PartialEq<OptionBool> for OptionBool
sourcefn eq(&self, other: &OptionBool) -> bool
fn eq(&self, other: &OptionBool) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &OptionBool) -> bool
fn ne(&self, other: &OptionBool) -> bool
This method tests for !=
.
impl Copy for OptionBool
impl EncodeLike<OptionBool> for OptionBool
impl Eq for OptionBool
impl StructuralEq for OptionBool
impl StructuralPartialEq for OptionBool
Auto Trait Implementations
impl RefUnwindSafe for OptionBool
impl Send for OptionBool
impl Sync for OptionBool
impl Unpin for OptionBool
impl UnwindSafe for OptionBool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more