[][src]Enum agnes::field::Value

pub enum Value<T> {
    Na,
    Exists(T),
}

(Possibly missing) data value container.

Variants

Na

Indicates a missing (NA) value.

Exists(T)

Indicates an existing value.

Methods

impl<T> Value<T>[src]

pub fn unwrap(self) -> T[src]

Unwrap a Value, revealing the data contained within. Panics if called on an Na value.

pub fn exists(&self) -> bool[src]

Test if a Value contains a value.

pub fn is_na(&self) -> bool[src]

Test if a Value is NA.

pub fn as_ref(&self) -> Value<&T>[src]

Returns a Value which contains a reference to the original underlying datum.

pub fn map<U, F: FnMut(T) -> U>(self, f: F) -> Value<U>[src]

Applies function f if this Value exists.

impl<'a, T: Clone> Value<&'a T>[src]

pub fn cloned(self) -> Value<T>[src]

Create a owner Value out of a reference-holding Value using clone().

Trait Implementations

impl<T: PartialEq> PartialEq<Value<T>> for Value<T>[src]

impl<'a, T> PartialEq<T> for Value<&'a T> where
    T: PartialEq<T>, 
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<T: Ord> Ord for Value<T>[src]

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

impl<T: Clone> Clone for Value<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> From<T> for Value<T>[src]

impl<'a, T> From<Value<&'a T>> for Value<T> where
    T: 'a + Clone
[src]

impl<T> From<Option<T>> for Value<T>[src]

impl<T> Into<Option<T>> for Value<T>[src]

impl<T: Eq> Eq for Value<T>[src]

impl<T: Copy> Copy for Value<T>[src]

impl<T: PartialOrd> PartialOrd<Value<T>> for Value<T>[src]

impl<'a, T> PartialOrd<T> for Value<&'a T> where
    T: PartialOrd<T>, 
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T> Display for Value<T> where
    T: Display
[src]

impl<'a, T: Hash> Hash for Value<T>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T, U> Add<Value<U>> for Value<T> where
    T: Add<U>, 
[src]

type Output = Value<<T as Add<U>>::Output>

The resulting type after applying the + operator.

impl<T, U> Sub<Value<U>> for Value<T> where
    T: Sub<U>, 
[src]

type Output = Value<<T as Sub<U>>::Output>

The resulting type after applying the - operator.

impl<T, U> Mul<Value<U>> for Value<T> where
    T: Mul<U>, 
[src]

type Output = Value<<T as Mul<U>>::Output>

The resulting type after applying the * operator.

impl<T, U> Div<Value<U>> for Value<T> where
    T: Div<U>, 
[src]

type Output = Value<<T as Div<U>>::Output>

The resulting type after applying the / operator.

impl<T> FromIterator<Value<T>> for FieldData<T> where
    T: Debug + Default
[src]

impl<'a, T> FromIterator<Value<&'a T>> for FieldData<T> where
    T: 'a + Debug + Default + Clone
[src]

impl<T: Debug> Debug for Value<T>[src]

impl<'a, T> Serialize for Value<&'a T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> Send for Value<T> where
    T: Send

impl<T> Sync for Value<T> where
    T: Sync

Blanket Implementations

impl<T> IntoLabeled for T[src]

impl<T> HasLabels for T[src]

impl<Needle, Haystack> HasLabels for Haystack where
    Haystack: Member<Needle, IsMember = B1>,
    Needle: Label
[src]

impl<O, U> Offset for U where
    U: Add<O>, 
[src]

type Output = <U as Add<O>>::Output

Result after applying offset O.

impl<Frames, Store> JoinIntoStore for Frames[src]

type Output = Store

The output type after augmenting Store.

impl<Frames> AssocDataIndexCons for Frames[src]

type Output = Nil

Type of associated data index cons-list.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Same for T[src]

type Output = T

Should always be Self