Enum agnes::masked::MaybeNa
[−]
[src]
pub enum MaybeNa<T: PartialOrd> { Na, Exists(T), }
Missing value container.
Variants
Na
Indicates a missing (NA) value.
Exists(T)
Indicates an existing value.
Methods
impl<T: PartialOrd> MaybeNa<T>
[src]
pub fn unwrap(self) -> T
[src]
Unwrap a MaybeNa
, revealing the data contained within. Panics if called on an Na
value.
pub fn exists(&self) -> bool
[src]
Test if a MaybeNa
contains a value.
pub fn is_na(&self) -> bool
[src]
Test if a MaybeNa
is NA.
impl<'a, T: PartialOrd + Clone> MaybeNa<&'a T>
[src]
pub fn cloned(self) -> MaybeNa<T>
[src]
Create a owner MaybeNa
out of a reference-holding MaybeNa
using clone()
.
Trait Implementations
impl<T: Debug + PartialOrd> Debug for MaybeNa<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: Clone + PartialOrd> Clone for MaybeNa<T>
[src]
fn clone(&self) -> MaybeNa<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq + PartialOrd> PartialEq for MaybeNa<T>
[src]
fn eq(&self, __arg_0: &MaybeNa<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MaybeNa<T>) -> bool
[src]
This method tests for !=
.
impl<T: Eq + PartialOrd> Eq for MaybeNa<T>
[src]
impl<T: PartialOrd + PartialOrd> PartialOrd for MaybeNa<T>
[src]
fn partial_cmp(&self, __arg_0: &MaybeNa<T>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &MaybeNa<T>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &MaybeNa<T>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &MaybeNa<T>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &MaybeNa<T>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Ord + PartialOrd> Ord for MaybeNa<T>
[src]
fn cmp(&self, __arg_0: &MaybeNa<T>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more