Struct sounding_base::missing_value::OptionVal
[−]
[src]
pub struct OptionVal<T: PartialEq + Copy + MissingData<T>> { /* fields omitted */ }
A newtype to wrap a type and implement the MissingData
trait.
Methods
impl<T> OptionVal<T> where
T: PartialEq + Copy + MissingData<T>,
[src]
T: PartialEq + Copy + MissingData<T>,
fn as_option(self) -> Option<T>
[src]
Convert it to an option. The into trait should cover this, but the compiler has troubles inferring the type, so this function is provided. The Into trait is still useful in contexts where the compiler can infer the type correctly, like the body of this function.
fn unwrap(self) -> T
[src]
Despite its name, this method does not panic, it just returns the interior value even if that value is the 'Missing Data' flag value.
Trait Implementations
impl<T: Clone + PartialEq + Copy + MissingData<T>> Clone for OptionVal<T>
[src]
fn clone(&self) -> OptionVal<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: Copy + PartialEq + Copy + MissingData<T>> Copy for OptionVal<T>
[src]
impl<T> Into<Option<T>> for OptionVal<T> where
T: PartialEq + Copy + MissingData<T>,
[src]
T: PartialEq + Copy + MissingData<T>,
impl<T> Default for OptionVal<T> where
T: PartialEq + Copy + MissingData<T>,
[src]
T: PartialEq + Copy + MissingData<T>,
impl<T> From<Option<T>> for OptionVal<T> where
T: PartialEq + Copy + MissingData<T>,
[src]
T: PartialEq + Copy + MissingData<T>,
impl<T> From<T> for OptionVal<T> where
T: PartialEq + Copy + MissingData<T>,
[src]
T: PartialEq + Copy + MissingData<T>,