pub enum Data {
String(String),
Int(i64),
Float(f64),
Bool(bool),
Null,
}Expand description
An enumeration of the possible SoR data types, that also contains the
data itself.
Variants§
String(String)
A String cell.
Int(i64)
A i64 cell.
Float(f64)
A f64 cell.
Bool(bool)
A bool cell.
Null
A missing value.
Implementations§
Source§impl Data
impl Data
Sourcepub fn unwrap_string(&self) -> String
pub fn unwrap_string(&self) -> String
Get the data assuming its a String
Sourcepub fn unwrap_int(&self) -> i64
pub fn unwrap_int(&self) -> i64
Get the data assuming its an int
Sourcepub fn unwrap_float(&self) -> f64
pub fn unwrap_float(&self) -> f64
Get the data assuming its a float
Sourcepub fn unwrap_bool(&self) -> bool
pub fn unwrap_bool(&self) -> bool
Get the data assuming its a bool
Trait Implementations§
Source§impl DeepSizeOf for Data
impl DeepSizeOf for Data
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Returns an estimation of the heap-managed storage of this object.
This does not include the size of the object itself. Read more
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Returns an estimation of a total size of memory owned by the
object, including heap-managed storage. Read more
Source§fn recurse_deep_size_of(&self, context: &mut Context) -> usize
fn recurse_deep_size_of(&self, context: &mut Context) -> usize
👎Deprecated since 0.1.1: use
std::mem::size_of_val(val) + val.deep_size_of_children() insteadDeprecated: equivalent to
std::mem::size_of_val(val) + val.deep_size_of_children()Source§impl<'de> Deserialize<'de> for Data
impl<'de> Deserialize<'de> for Data
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Data, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Data, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Data
Print the Data of a Data cell.
The number for Ints and floats.
0 for false.
1 for true.
A double quote delimited String.
and “Missing Value” for missing data.
impl Display for Data
Print the Data of a Data cell.
The number for Ints and floats.
0 for false.
1 for true.
A double quote delimited String.
and “Missing Value” for missing data.
Source§impl From<Data> for LocalDataFrame
impl From<Data> for LocalDataFrame
Source§impl Serialize for Data
impl Serialize for Data
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more