[−][src]Trait agnes::access::DataIndex
Trait that provides access to values in a data field.
Associated Types
type DType
The data type contained within this field.
Required methods
fn get_datum(&self, idx: usize) -> Result<Value<&Self::DType>>
Returns the data (possibly NA) at the specified index, if it exists.
fn len(&self) -> usize
Returns the length of this data field.
Provided methods
fn is_empty(&self) -> bool
Returns whether or not this field is empty.
ⓘImportant traits for DataIterator<'a, 'b, T>fn iter(&self) -> DataIterator<Self::DType> where
Self: Sized,
ⓘImportant traits for DataIterator<'a, 'b, T>
Self: Sized,
Returns an iterator over the values in this field.
fn permute<'a, 'b>(
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
Returns an iterator over the values in this field, as permuted by pemutation
.
permutation
is a slice of indices into this DataIndex
.
fn to_vec(&self) -> Vec<Self::DType> where
Self: Sized,
Self::DType: Clone,
Self: Sized,
Self::DType: Clone,
Copies existing values in this field into a new Vec
.
If this field has missing values, this method will return a vector of length less than that
returned by the len
method.
fn to_value_vec(&self) -> Vec<Value<Self::DType>> where
Self: Sized,
Self::DType: Clone,
Self: Sized,
Self::DType: Clone,
Copies values (missing or existing) in this field into a new Vec
.
Implementors
impl<T> DataIndex for FieldData<T> where
T: Debug,
[src]
T: Debug,
type DType = T
fn get_datum(&self, idx: usize) -> Result<Value<&T>>
[src]
fn len(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
ⓘImportant traits for DataIterator<'a, 'b, T>fn iter(&self) -> DataIterator<Self::DType> where
Self: Sized,
[src]
ⓘImportant traits for DataIterator<'a, 'b, T>
Self: Sized,
fn permute<'a, 'b>(
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
[src]
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
fn to_vec(&self) -> Vec<Self::DType> where
Self: Sized,
Self::DType: Clone,
[src]
Self: Sized,
Self::DType: Clone,
fn to_value_vec(&self) -> Vec<Value<Self::DType>> where
Self: Sized,
Self::DType: Clone,
[src]
Self: Sized,
Self::DType: Clone,
impl<T> DataIndex for Framed<T> where
T: Debug,
[src]
T: Debug,
type DType = T
fn get_datum(&self, idx: usize) -> Result<Value<&T>>
[src]
fn len(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
ⓘImportant traits for DataIterator<'a, 'b, T>fn iter(&self) -> DataIterator<Self::DType> where
Self: Sized,
[src]
ⓘImportant traits for DataIterator<'a, 'b, T>
Self: Sized,
fn permute<'a, 'b>(
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
[src]
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
fn to_vec(&self) -> Vec<Self::DType> where
Self: Sized,
Self::DType: Clone,
[src]
Self: Sized,
Self::DType: Clone,
fn to_value_vec(&self) -> Vec<Value<Self::DType>> where
Self: Sized,
Self::DType: Clone,
[src]
Self: Sized,
Self::DType: Clone,
impl<T> DataIndex for DataRef<T> where
FieldData<T>: DataIndex<DType = T>,
T: Debug,
[src]
FieldData<T>: DataIndex<DType = T>,
T: Debug,
type DType = T
fn get_datum(&self, idx: usize) -> Result<Value<&T>>
[src]
fn len(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
ⓘImportant traits for DataIterator<'a, 'b, T>fn iter(&self) -> DataIterator<Self::DType> where
Self: Sized,
[src]
ⓘImportant traits for DataIterator<'a, 'b, T>
Self: Sized,
fn permute<'a, 'b>(
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
[src]
&'a self,
permutation: &'b [usize]
) -> Result<DataIterator<'a, 'b, Self::DType>> where
Self: Sized,
fn to_vec(&self) -> Vec<Self::DType> where
Self: Sized,
Self::DType: Clone,
[src]
Self: Sized,
Self::DType: Clone,
fn to_value_vec(&self) -> Vec<Value<Self::DType>> where
Self: Sized,
Self::DType: Clone,
[src]
Self: Sized,
Self::DType: Clone,