Struct agnes::store::DataStore
[−]
[src]
pub struct DataStore { pub fields: Vec<DsField>, pub field_map: HashMap<FieldIdent, usize>, // some fields omitted }
Data storage underlying a dataframe. Data is retrievable both by index (of the fields vector) and by field name.
Fields
fields: Vec<DsField>
List of fields within the data store
field_map: HashMap<FieldIdent, usize>
Map of field names to index of the fields vector
Methods
impl DataStore
[src]
pub fn empty() -> DataStore
[src]
Generate and return an empty data store
pub fn insert(&mut self, field: SrcField, value_str: String) -> Result<()>
[src]
Insert a value (provided in unparsed string form) for specified field
pub fn get_unsigned_field(&self, ident: &FieldIdent) -> Option<&MaskedData<u64>>
[src]
Retrieve an unsigned integer field
pub fn get_signed_field(&self, ident: &FieldIdent) -> Option<&MaskedData<i64>>
[src]
Retrieve a signed integer field
pub fn get_text_field(&self, ident: &FieldIdent) -> Option<&MaskedData<String>>
[src]
Retrieve a string field
pub fn get_boolean_field(&self, ident: &FieldIdent) -> Option<&MaskedData<bool>>
[src]
Retrieve a boolean field
pub fn get_float_field(&self, ident: &FieldIdent) -> Option<&MaskedData<f64>>
[src]
Retrieve a floating-point field
pub fn get_field_data(&self, ident: &FieldIdent) -> Option<FieldData>
[src]
Get all the data for a field, returned within the FieldData
common data enum. Returns
None
if the specified FieldIdent
object does not exist.
pub fn get_field_info(&self, ident: &FieldIdent) -> Option<&DsField>
[src]
Get the field information struct for a given field name
pub fn fields(&self) -> Vec<&DsField>
[src]
Get the list of field information structs for this data store
pub fn fieldnames(&self) -> Vec<String>
[src]
Get the field names in this data store
pub fn is_homogeneous(&self) -> bool
[src]
Check if datastore is "homogenous": all columns (regardless of field type) are the same length
pub fn nrows(&self) -> usize
[src]
Retrieve number of rows for this data store
Trait Implementations
impl Debug for DataStore
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more