[][src]Trait agnes::access::DataIndex

pub trait DataIndex: Debug {
    type DType;
    fn get_datum(&self, idx: usize) -> Result<Value<&Self::DType>>;
fn len(&self) -> usize; fn is_empty(&self) -> bool { ... }
fn iter(&self) -> DataIterator<Self::DType>
    where
        Self: Sized
, { ... }
fn permute(self, permutation: &[usize]) -> Framed<Self::DType, Self>
    where
        Self: Sized
, { ... }
fn to_vec(&self) -> Vec<Self::DType>
    where
        Self: Sized,
        Self::DType: Clone
, { ... }
fn to_value_vec(&self) -> Vec<Value<Self::DType>>
    where
        Self: Sized,
        Self::DType: Clone
, { ... } }

Trait that provides access to values in a data field.

Associated Types

type DType

The data type contained within this field.

Loading content...

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.

Loading content...

Provided methods

fn is_empty(&self) -> bool

Returns whether or not this field is empty.

Important traits for DataIterator<'a, T>
fn iter(&self) -> DataIterator<Self::DType> where
    Self: Sized

Returns an iterator over the values in this field.

fn permute(self, permutation: &[usize]) -> Framed<Self::DType, Self> where
    Self: Sized

Returns a new DataIndex-implementing object which provides access to the values in this field as permuted by permutation. permutation is a slice of indices into this DataIndex.

fn to_vec(&self) -> Vec<Self::DType> where
    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

Copies values (missing or existing) in this field into a new Vec.

Loading content...

Implementors

impl<T> DataIndex for FieldData<T> where
    T: Debug
[src]

type DType = T

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

Important traits for DataIterator<'a, T>
fn iter(&self) -> DataIterator<Self::DType> where
    Self: Sized
[src]

fn permute(self, permutation: &[usize]) -> Framed<Self::DType, Self> where
    Self: Sized
[src]

fn to_vec(&self) -> Vec<Self::DType> where
    Self: Sized,
    Self::DType: Clone
[src]

fn to_value_vec(&self) -> Vec<Value<Self::DType>> where
    Self: Sized,
    Self::DType: Clone
[src]

impl<T> DataIndex for DataRef<T> where
    FieldData<T>: DataIndex<DType = T>,
    T: Debug
[src]

type DType = T

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

Important traits for DataIterator<'a, T>
fn iter(&self) -> DataIterator<Self::DType> where
    Self: Sized
[src]

fn permute(self, permutation: &[usize]) -> Framed<Self::DType, Self> where
    Self: Sized
[src]

fn to_vec(&self) -> Vec<Self::DType> where
    Self: Sized,
    Self::DType: Clone
[src]

fn to_value_vec(&self) -> Vec<Value<Self::DType>> where
    Self: Sized,
    Self::DType: Clone
[src]

impl<T, DI> DataIndex for Framed<T, DI> where
    T: Debug,
    DI: DataIndex<DType = T> + Debug
[src]

type DType = T

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

Important traits for DataIterator<'a, T>
fn iter(&self) -> DataIterator<Self::DType> where
    Self: Sized
[src]

fn permute(self, permutation: &[usize]) -> Framed<Self::DType, Self> where
    Self: Sized
[src]

fn to_vec(&self) -> Vec<Self::DType> where
    Self: Sized,
    Self::DType: Clone
[src]

fn to_value_vec(&self) -> Vec<Value<Self::DType>> where
    Self: Sized,
    Self::DType: Clone
[src]

Loading content...