Enum brevdash_data::DataValue[][src]

pub enum DataValue {
    Boolean(bool),
    Integer(i64),
}

The value of a data entry.

Variants

Boolean(bool)

A boolean value.

Integer(i64)

An integer value.

Implementations

impl DataValue[src]

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

Unwrap the contained value if it is a DataValue::Boolean. If the value is not a DataValue::Boolean, this method panics.

pub fn unwrap_integer(&self) -> i64[src]

Unwrap the contained value if it is a DataValue::Integer. If the value is not a DataValue::Integer, this method panics.

pub fn boolean(&self) -> Option<bool>[src]

Get the contained value if it is a DataValue::Boolean. If the value is not a DataValue::Boolean, None is returned.

pub fn integer(&self) -> Option<i64>[src]

Get the contained value if it is a DataValue::Integer. If the value is not a DataValue::Integer, None is returned.

pub fn datatype(&self) -> DataType[src]

Get the type of the data value.

Trait Implementations

impl Clone for DataValue[src]

impl Copy for DataValue[src]

impl Debug for DataValue[src]

impl<'de> Deserialize<'de> for DataValue[src]

impl FromStr for DataValue[src]

type Err = Error

The associated error which can be returned from parsing.

impl Serialize for DataValue[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.