[−][src]Enum spreadsheet_ods::Value
Content-Values
Variants
Boolean(bool)Number(f64)Percentage(f64)Text(String)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]
fn from(dt: NaiveDateTime) -> Self[src]
impl From<Option<Duration>> for Value[src]
impl From<Option<NaiveDate>> for Value[src]
impl From<Option<NaiveDateTime>> for Value[src]
fn from(dt: Option<NaiveDateTime>) -> Self[src]
impl From<Option<String>> 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,