Enum spreadsheet_ods::Value [−][src]
pub enum Value { Empty, Boolean(bool), Number(f64), Percentage(f64), Currency(String, f64), Text(String), TextXml(Box<TextTag>), DateTime(NaiveDateTime), TimeDuration(Duration), }
Content-Values
Variants
Boolean(bool)
Number(f64)
Percentage(f64)
Text(String)
DateTime(NaiveDateTime)
TimeDuration(Duration)
Implementations
impl Value
[src]
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 From<NaiveDateTime> for Value
[src]
impl From<NaiveDateTime> for Value
[src]fn from(dt: NaiveDateTime) -> Self
[src]
impl From<Option<NaiveDateTime>> for Value
[src]
impl From<Option<NaiveDateTime>> for Value
[src]fn from(dt: Option<NaiveDateTime>) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl RefUnwindSafe for Value
impl UnwindSafe for Value
impl UnwindSafe for Value