[][src]Enum calamine::DataType

pub enum DataType {
    Int(i64),
    Float(f64),
    String(String),
    Bool(bool),
    Error(CellErrorType),
    Empty,
}

An enum to represent all different data types that can appear as a value in a worksheet cell

Variants

Int(i64)

Unsigned integer

Float(f64)

Float

String(String)

String

Bool(bool)

Boolean

Error

Empty

Empty cell

Methods

impl DataType[src]

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

Assess if datatype is empty

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

Assess if datatype is a int

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

Assess if datatype is a float

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

Assess if datatype is a bool

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

Assess if datatype is a string

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

Try getting int value

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

Try getting float value

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

Try getting bool value

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

Try getting string value

Trait Implementations

impl<'a> ToCellDeserializer<'a> for DataType[src]

type Deserializer = DataTypeDeserializer<'a>

The deserializer.

impl From<i64> for DataType[src]

impl From<f64> for DataType[src]

impl From<String> for DataType[src]

impl From<bool> for DataType[src]

impl From<CellErrorType> for DataType[src]

impl<'a> From<&'a str> for DataType[src]

impl From<()> for DataType[src]

impl<T> From<Option<T>> for DataType where
    DataType: From<T>, 
[src]

impl Clone for DataType[src]

impl Default for DataType[src]

impl PartialEq<DataType> for DataType[src]

impl PartialEq<str> for DataType[src]

impl PartialEq<f64> for DataType[src]

impl PartialEq<bool> for DataType[src]

impl PartialEq<i64> for DataType[src]

impl Display for DataType[src]

impl Debug for DataType[src]

impl StructuralPartialEq for DataType[src]

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

Auto Trait Implementations

Blanket Implementations

impl<T> CellType for T where
    T: PartialEq<T> + Clone + Default
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]