Enum spreadsheet_ods::Value[][src]

pub enum Value {
    Empty,
    Boolean(bool),
    Number(f64),
    Percentage(f64),
    Currency(Stringf64),
    Text(String),
    TextXml(Box<TextTag>),
    DateTime(NaiveDateTime),
    TimeDuration(Duration),
}

Content-Values

Variants

Empty
Boolean(bool)
Number(f64)
Percentage(f64)
Currency(Stringf64)
Text(String)
TextXml(Box<TextTag>)
DateTime(NaiveDateTime)
TimeDuration(Duration)

Implementations

impl Value[src]

pub fn value_type(&self) -> ValueType[src]

pub fn as_bool_or(&self, d: bool) -> bool[src]

Return the bool if the value is a Boolean. Default otherwise.

pub fn as_i32_or(&self, d: i32) -> i32[src]

Return the content as i32 if the value is a number, percentage or currency. Default otherwise.

pub fn as_i32_opt(&self) -> Option<i32>[src]

Return the content as i32 if the value is a number, percentage or currency.

pub fn as_u32_or(&self, d: u32) -> u32[src]

Return the content as u32 if the value is a number, percentage or currency. Default otherwise.

pub fn as_u32_opt(&self) -> Option<u32>[src]

Return the content as u32 if the value is a number, percentage or currency.

pub fn as_f64_or(&self, d: f64) -> f64[src]

Return the content as f64 if the value is a number, percentage or currency. Default otherwise.

pub fn as_f64_opt(&self) -> Option<f64>[src]

Return the content as f64 if the value is a number, percentage or currency.

pub fn as_str_or<'a>(&'a self, d: &'a str) -> &'a str[src]

Return the content as str if the value is text.

pub fn as_str_opt(&self) -> Option<&str>[src]

Return the content as str if the value is text.

pub fn as_timeduration_or(&self, d: Duration) -> Duration[src]

Return the content as Duration if the value is a TimeDuration. Default otherwise.

pub fn as_timeduration_opt(&self) -> Option<Duration>[src]

Return the content as Duration if the value is a TimeDuration. Default otherwise.

pub fn as_datetime_or(&self, d: NaiveDateTime) -> NaiveDateTime[src]

Return the content as NaiveDateTime if the value is a DateTime. Default otherwise.

pub fn as_datetime_opt(&self) -> Option<NaiveDateTime>[src]

Return the content as an optional NaiveDateTime if the value is a DateTime.

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Default for Value[src]

impl From<&'_ String> for Value[src]

impl From<&'_ str> for Value[src]

impl From<()> for Value[src]

impl From<Duration> for Value[src]

impl From<NaiveDate> for Value[src]

impl From<NaiveDateTime> for Value[src]

impl From<Option<&'_ String>> for Value[src]

impl From<Option<&'_ f32>> for Value[src]

impl From<Option<&'_ f64>> for Value[src]

impl From<Option<&'_ i16>> for Value[src]

impl From<Option<&'_ i32>> for Value[src]

impl From<Option<&'_ i64>> for Value[src]

impl From<Option<&'_ i8>> for Value[src]

impl From<Option<&'_ str>> for Value[src]

impl From<Option<&'_ u16>> for Value[src]

impl From<Option<&'_ u32>> for Value[src]

impl From<Option<&'_ u64>> for Value[src]

impl From<Option<&'_ u8>> for Value[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl From<String> for Value[src]

impl From<XmlTag> for Value[src]

impl From<bool> for Value[src]

impl From<f32> for Value[src]

impl From<f64> for Value[src]

impl From<i16> for Value[src]

impl From<i32> for Value[src]

impl From<i64> for Value[src]

impl From<i8> for Value[src]

impl From<u16> for Value[src]

impl From<u32> for Value[src]

impl From<u64> for Value[src]

impl From<u8> for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

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.