Enum spreadsheet_ods::Value[][src]

pub enum Value {
    Empty,
    Boolean(bool),
    Number(f64),
    Percentage(f64),
    Currency(f64, [u8; 3]),
    Text(String),
    TextXml(Vec<TextTag>),
    DateTime(NaiveDateTime),
    TimeDuration(Duration),
}
Expand description

Content-Values

Variants

Empty
Boolean

Tuple Fields of Boolean

0: bool
Number

Tuple Fields of Number

0: f64
Percentage

Tuple Fields of Percentage

0: f64
Currency

Tuple Fields of Currency

0: f641: [u8; 3]
Text

Tuple Fields of Text

0: String
TextXml

Tuple Fields of TextXml

0: Vec<TextTag>
DateTime

Tuple Fields of DateTime

0: NaiveDateTime
TimeDuration

Tuple Fields of TimeDuration

0: Duration

Implementations

Return the plan ValueType for this value.

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

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

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

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

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

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

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

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

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

Return the content as str if the value is text.

Return the content as str if the value is text.

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

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

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

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

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

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

Returns the currency code or “” if the value is not a currency.

Create a currency value.

Create a percentage value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.