Struct agnes::view::DataView
[−]
[src]
pub struct DataView { /* fields omitted */ }
A 'view' into a data store. The primary struct for viewing and manipulating data.
Methods
impl DataView
[src]
pub fn v<L: IntoFieldList>(&self, s: L) -> DataView
[src]
Generate a new subview of this DataView.
pub fn subview<L: IntoFieldList>(&self, s: L) -> Result<DataView>
[src]
Generate a new subview of this DataView, generating an error if a specified field does not exist.
pub fn nrows(&self) -> usize
[src]
Number of rows in this data view
pub fn is_empty(&self) -> bool
[src]
Returns true
if the DataView is empty (has no rows or has no fields)
pub fn nfields(&self) -> usize
[src]
Number of fields in this data view
pub fn fieldnames(&self) -> Vec<&FieldIdent>
[src]
Field names in this data view
pub fn get_field_type(&self, ident: &FieldIdent) -> Option<FieldType>
[src]
Return the field type for specified field
pub fn field_types(&self) -> Vec<TypedFieldIdent>
[src]
Return the field types (as TypedFieldIdent
structs) of this DataView
pub fn has_field(&self, s: &FieldIdent) -> bool
[src]
Returns true
if this DataView
contains this field.
pub fn rename<T, U>(&mut self, orig: T, new: U) -> Result<()> where
T: Into<FieldIdent>,
U: Into<FieldIdent>,
[src]
T: Into<FieldIdent>,
U: Into<FieldIdent>,
Rename a field of this DataView.
pub fn merge(&self, other: &DataView) -> Result<DataView>
[src]
Merge this DataView
with another DataView
object, creating a new DataView
with the
same number of rows and all the fields from both source DataView
objects.
pub fn join(&self, other: &DataView, join: Join) -> Result<DataStore>
[src]
Combine two DataView
objects using specified join, creating a new DataStore
object with
a subset of records from the two source DataView
s according to the join parameters.
Note that since this is creating a new DataStore
object, it will be allocated new data to
store the contents of the joined DataView
s.
impl DataView
[src]
pub fn as_fieldview(&self) -> Option<FieldView>
[src]
Create a FieldView
object from a DataView
object, if possible. Typically, use this on
DataView
objects with only a single field; however, if the DataView
object has multiple
fields, the first one will be used for this FieldView
. Returns None
if the DataView
has no fields (is empty).
Trait Implementations
impl Debug for DataView
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for DataView
[src]
fn clone(&self) -> DataView
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for DataView
[src]
impl ApplyTo for DataView
[src]
fn apply_to<F: MapFn>(
&self,
f: &mut F,
ident: &FieldIdent
) -> Result<Vec<F::Output>>
[src]
&self,
f: &mut F,
ident: &FieldIdent
) -> Result<Vec<F::Output>>
Apply a MapFn
to a specific field of this data structure.
impl ApplyToElem for DataView
[src]
fn apply_to_elem<F: MapFn>(
&self,
f: &mut F,
ident: &FieldIdent,
idx: usize
) -> Result<F::Output>
[src]
&self,
f: &mut F,
ident: &FieldIdent,
idx: usize
) -> Result<F::Output>
Apply a MapFn
to the specific field and index of this data structure.
impl FieldApplyTo for DataView
[src]
fn field_apply_to<F: FieldMapFn>(
&self,
f: &mut F,
ident: &FieldIdent
) -> Result<F::Output>
[src]
&self,
f: &mut F,
ident: &FieldIdent
) -> Result<F::Output>
Apply a FieldMapFn
to specified field on this data structure.
impl<T> Filter<T> for DataView where
DataFrame: Filter<T>,
[src]
DataFrame: Filter<T>,
fn filter<F: Fn(&T) -> bool>(
&mut self,
ident: &FieldIdent,
pred: F
) -> Result<Vec<usize>>
[src]
&mut self,
ident: &FieldIdent,
pred: F
) -> Result<Vec<usize>>
Filter the contents of this data structure by applying the supplied predicate on the specified field. Read more
impl SortBy for DataView
[src]
fn sort_by(&mut self, ident: &FieldIdent) -> Result<Vec<usize>>
[src]
Sort the contents of this data structure (ascending) by the specified field.
impl From<DataStore> for DataView
[src]
impl Display for DataView
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Serialize for DataView
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<A: IntoMaybeNa> FromMap<A> for DataView where
DataStore: AddDataVec<A::DType>,
[src]
DataStore: AddDataVec<A::DType>,
fn from_map<'a, D: 'a + Apply, F>(map: Map<'a, D, F>) -> Result<DataView> where
F: MapFn<Output = A>,
[src]
F: MapFn<Output = A>,
Convert a Map
structure into the resultant data structure.
impl Matches<u64> for DataView
[src]
fn matches(&self, target: u64, ident: &FieldIdent, idx: usize) -> Result<bool>
[src]
Returns true
if the element specified with the Selector
matches the provided target value. Read more
impl Matches<i64> for DataView
[src]
fn matches(&self, target: i64, ident: &FieldIdent, idx: usize) -> Result<bool>
[src]
Returns true
if the element specified with the Selector
matches the provided target value. Read more
impl Matches<String> for DataView
[src]
fn matches(
&self,
target: String,
ident: &FieldIdent,
idx: usize
) -> Result<bool>
[src]
&self,
target: String,
ident: &FieldIdent,
idx: usize
) -> Result<bool>
Returns true
if the element specified with the Selector
matches the provided target value. Read more
impl Matches<bool> for DataView
[src]
fn matches(&self, target: bool, ident: &FieldIdent, idx: usize) -> Result<bool>
[src]
Returns true
if the element specified with the Selector
matches the provided target value. Read more
impl Matches<f64> for DataView
[src]
fn matches(&self, target: f64, ident: &FieldIdent, idx: usize) -> Result<bool>
[src]
Returns true
if the element specified with the Selector
matches the provided target value. Read more
impl MatchesAll<u64> for DataView
[src]
fn matches_all<F: Fn(&u64) -> bool>(
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
[src]
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
Returns true
if the all elements in the field specified with the Selector
pass the predicate. Read more
impl MatchesAll<i64> for DataView
[src]
fn matches_all<F: Fn(&i64) -> bool>(
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
[src]
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
Returns true
if the all elements in the field specified with the Selector
pass the predicate. Read more
impl MatchesAll<String> for DataView
[src]
fn matches_all<F: Fn(&String) -> bool>(
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
[src]
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
Returns true
if the all elements in the field specified with the Selector
pass the predicate. Read more
impl MatchesAll<bool> for DataView
[src]
fn matches_all<F: Fn(&bool) -> bool>(
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
[src]
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
Returns true
if the all elements in the field specified with the Selector
pass the predicate. Read more
impl MatchesAll<f64> for DataView
[src]
fn matches_all<F: Fn(&f64) -> bool>(
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
[src]
&self,
pred: F,
ident: &FieldIdent
) -> Result<bool>
Returns true
if the all elements in the field specified with the Selector
pass the predicate. Read more
impl<'a> Add<u64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> Result<DataView>
[src]
Performs the +
operation.
impl Add<u64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Add<&'a DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl Add<DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Add<i64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: i64) -> Result<DataView>
[src]
Performs the +
operation.
impl Add<i64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: i64) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Add<&'a DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl Add<DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Add<f64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: f64) -> Result<DataView>
[src]
Performs the +
operation.
impl Add<f64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: f64) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Add<&'a DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl Add<DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Sub<u64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: u64) -> Result<DataView>
[src]
Performs the -
operation.
impl Sub<u64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: u64) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Sub<&'a DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl Sub<DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Sub<i64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: i64) -> Result<DataView>
[src]
Performs the -
operation.
impl Sub<i64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: i64) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Sub<&'a DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl Sub<DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Sub<f64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: f64) -> Result<DataView>
[src]
Performs the -
operation.
impl Sub<f64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: f64) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Sub<&'a DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl Sub<DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Mul<u64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Result<DataView>
[src]
Performs the *
operation.
impl Mul<u64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Mul<&'a DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl Mul<DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Mul<i64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: i64) -> Result<DataView>
[src]
Performs the *
operation.
impl Mul<i64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: i64) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Mul<&'a DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl Mul<DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Mul<f64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> Result<DataView>
[src]
Performs the *
operation.
impl Mul<f64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Mul<&'a DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl Mul<DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Div<u64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: u64) -> Result<DataView>
[src]
Performs the /
operation.
impl Div<u64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: u64) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Div<&'a DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl Div<DataView> for u64
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Div<i64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: i64) -> Result<DataView>
[src]
Performs the /
operation.
impl Div<i64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: i64) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Div<&'a DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl Div<DataView> for i64
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Div<f64> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: f64) -> Result<DataView>
[src]
Performs the /
operation.
impl Div<f64> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: f64) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Div<&'a DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl Div<DataView> for f64
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a, 'b> Add<&'b DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: &'b DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl Add<DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Add<&'a DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a> Add<DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the +
operator.
fn add(self, rhs: DataView) -> Result<DataView>
[src]
Performs the +
operation.
impl<'a, 'b> Sub<&'b DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl Sub<DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Sub<&'a DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a> Sub<DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn sub(self, rhs: DataView) -> Result<DataView>
[src]
Performs the -
operation.
impl<'a, 'b> Mul<&'b DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl Mul<DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Mul<&'a DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a> Mul<DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the *
operator.
fn mul(self, rhs: DataView) -> Result<DataView>
[src]
Performs the *
operation.
impl<'a, 'b> Div<&'b DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: &'b DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl Div<DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Div<&'a DataView> for DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: &'a DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Div<DataView> for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the /
operator.
fn div(self, rhs: DataView) -> Result<DataView>
[src]
Performs the /
operation.
impl<'a> Neg for &'a DataView
[src]
type Output = Result<DataView>
The resulting type after applying the -
operator.
fn neg(self) -> Result<DataView>
[src]
Performs the unary -
operation.