Struct fera_optional::OptionalBool
source · pub struct OptionalBool(_);
Expand description
An Optional
for bool
with 1 byte size.
std::option::Option<bool>
have size 1 since rustc 1.23.
Trait Implementations
sourceimpl Clone for OptionalBool
impl Clone for OptionalBool
sourcefn clone(&self) -> OptionalBool
fn clone(&self) -> OptionalBool
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 moresourceimpl Debug for OptionalBool
impl Debug for OptionalBool
sourceimpl Default for OptionalBool
impl Default for OptionalBool
sourcefn default() -> OptionalBool
fn default() -> OptionalBool
Returns the “default value” for a type. Read more
sourceimpl From<Option<bool>> for OptionalBool
impl From<Option<bool>> for OptionalBool
sourceimpl From<bool> for OptionalBool
impl From<bool> for OptionalBool
sourceimpl Hash for OptionalBool
impl Hash for OptionalBool
sourceimpl Optional<bool> for OptionalBool
impl Optional<bool> for OptionalBool
sourcefn to_option_ref(&self) -> Option<&bool>
fn to_option_ref(&self) -> Option<&bool>
Returns an
Option<&T>
that is equivalent to this Optional
.sourcefn to_option_mut(&mut self) -> Option<&mut bool>
fn to_option_mut(&mut self) -> Option<&mut bool>
Returns an
Option<&mut T>
that is equivalent to this Optional
.sourcefn into_option(self) -> Option<bool>
fn into_option(self) -> Option<bool>
Converts this
Optional
to the equivalent Option
.sourceimpl Ord for OptionalBool
impl Ord for OptionalBool
sourcefn cmp(&self, other: &OptionalBool) -> Ordering
fn cmp(&self, other: &OptionalBool) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<OptionalBool> for OptionalBool
impl PartialEq<OptionalBool> for OptionalBool
sourcefn eq(&self, other: &OptionalBool) -> bool
fn eq(&self, other: &OptionalBool) -> bool
sourceimpl PartialOrd<OptionalBool> for OptionalBool
impl PartialOrd<OptionalBool> for OptionalBool
sourcefn partial_cmp(&self, other: &OptionalBool) -> Option<Ordering>
fn partial_cmp(&self, other: &OptionalBool) -> Option<Ordering>
1.0.0 · sourcefn 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 moreimpl Copy for OptionalBool
impl Eq for OptionalBool
impl StructuralEq for OptionalBool
impl StructuralPartialEq for OptionalBool
Auto Trait Implementations
impl RefUnwindSafe for OptionalBool
impl Send for OptionalBool
impl Sync for OptionalBool
impl Unpin for OptionalBool
impl UnwindSafe for OptionalBool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more