Struct rusty_data::datatable::DataColumn
[−]
[src]
pub struct DataColumn {
pub name: Option<String>,
// some fields omitted
}A data column consisting of Strings.
Fields
name: Option<String>
The name associated with the DataColumn.
Methods
impl DataColumn[src]
fn empty() -> DataColumn
Constructs an empty data column.
fn len(&self) -> usize
Gets the length of the data column.
fn data(&self) -> &Vec<String>
Gets an immutable reference to the underlying data.
fn push(&mut self, val: &str)
Pushes a new &str to the column.
fn shrink_to_fit(&mut self)
Shrink the column to fit the data.
fn into_vec<T: FromStr>(self) -> Result<Vec<T>, DataError>
Consumes self and returns a Vec of the requested type.
Failures
- DataCastError : Returned when the data cannot be parsed to the requested type.
fn cast<T: FromStr>(&self) -> Option<Vec<T>>
Cast the data to the requested type.
Returns a Vec of the requested type wrapped in an option.
fn into_iter_cast<U: FromStr>(self) -> Map<IntoIter<String>, fn(String) -> Result<U, U::Err>> where U: FromStr
Consumes self and returns an iterator which parses the data to the specified type returning results.
The iterator will return a result on next() detailing
the outcome of the parse.