[][src]Enum metar::Data

pub enum Data<T> {
    Known(T),
    Unknown,
}

Data that is provided in a metar which might be unknown. Note that this differs from an Option<T> field which is used when data might not be given at all. In the cases where Data<T> is used, data is usually given but has been replaced in the METAR by slashes, indicating that it is not known.

Variants

Known(T)

The data is known and given

Unknown

The data isn't or cannot be known

Methods

impl<T> Data<T>[src]

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

Unwraps the inner data type, panics otherwise

pub fn unwrap_mut(&mut self) -> &mut T[src]

Mutably unwraps the inner data type, panics otherwise

Trait Implementations

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

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

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

impl<T: Hash> Hash for Data<T>[src]

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

impl<T> StructuralEq for Data<T>[src]

impl<T> StructuralPartialEq for Data<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Data<T> where
    T: RefUnwindSafe

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

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

impl<T> Unpin for Data<T> where
    T: Unpin

impl<T> UnwindSafe for Data<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.