Struct agnes::masked::MaskedData
[−]
[src]
pub struct MaskedData<T> { /* fields omitted */ }
Data vector along with bit-vector-based mask indicating whether or not values exist.
Methods
impl<T: PartialOrd> MaskedData<T>
[src]
pub fn len(&self) -> usize
[src]
Length of this data vector
pub fn get(&self, index: usize) -> Option<MaybeNa<&T>>
[src]
Get the value at the given index. Return None
if index
is out of bounds, or a MaybeNa
Object with the value (or indicator that value is missing).
pub fn as_vec(&self) -> Vec<MaybeNa<&T>>
[src]
Interpret MaskedData
as a Vec
of MaybeNa
objects.
impl<T: Default + PartialOrd> MaskedData<T>
[src]
pub fn new() -> MaskedData<T>
[src]
Create new empty MaskedData
struct.
pub fn new_with_elem(value: MaybeNa<T>) -> MaskedData<T>
[src]
Create new masked data vector with single element.
pub fn push(&mut self, value: MaybeNa<T>)
[src]
Add a new value (or an indication of a missing one) to the data vector
pub fn from_vec<U: Into<T>>(v: Vec<U>) -> MaskedData<T>
[src]
Create a MaskedData
struct from a vector of non-NA values. Resulting MaskedData
struct
will have no MaybeNa::Na
values.
pub fn from_masked_vec(v: Vec<MaybeNa<T>>) -> MaskedData<T>
[src]
Create a MaskedData
struct from a vector of masked values.
Trait Implementations
impl<T: Debug> Debug for MaskedData<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: Clone> Clone for MaskedData<T>
[src]
fn clone(&self) -> MaskedData<T>
[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<T: PartialOrd + Default, U: Into<T>> From<Vec<U>> for MaskedData<T>
[src]
fn from(other: Vec<U>) -> MaskedData<T>
[src]
Performs the conversion.
impl DataIndex<u64> for MaskedData<u64>
[src]
fn get_data(&self, idx: usize) -> Result<MaybeNa<&u64>>
[src]
Returns the data (possibly NA) at the specified index, if it exists.
fn len(&self) -> usize
[src]
Returns the length of this data field.
impl DataIndex<i64> for MaskedData<i64>
[src]
fn get_data(&self, idx: usize) -> Result<MaybeNa<&i64>>
[src]
Returns the data (possibly NA) at the specified index, if it exists.
fn len(&self) -> usize
[src]
Returns the length of this data field.
impl DataIndex<String> for MaskedData<String>
[src]
fn get_data(&self, idx: usize) -> Result<MaybeNa<&String>>
[src]
Returns the data (possibly NA) at the specified index, if it exists.
fn len(&self) -> usize
[src]
Returns the length of this data field.
impl DataIndex<bool> for MaskedData<bool>
[src]
fn get_data(&self, idx: usize) -> Result<MaybeNa<&bool>>
[src]
Returns the data (possibly NA) at the specified index, if it exists.
fn len(&self) -> usize
[src]
Returns the length of this data field.
impl DataIndex<f64> for MaskedData<f64>
[src]
fn get_data(&self, idx: usize) -> Result<MaybeNa<&f64>>
[src]
Returns the data (possibly NA) at the specified index, if it exists.
fn len(&self) -> usize
[src]
Returns the length of this data field.
impl ApplyToElem<IndexSelector> for MaskedData<u64>
[src]
fn apply_to_elem<F: ElemFn>(
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
[src]
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
Apply an ElemFn
to an element selected with the provided Selector
.
impl ApplyToElem<IndexSelector> for MaskedData<i64>
[src]
fn apply_to_elem<F: ElemFn>(
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
[src]
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
Apply an ElemFn
to an element selected with the provided Selector
.
impl ApplyToElem<IndexSelector> for MaskedData<String>
[src]
fn apply_to_elem<F: ElemFn>(
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
[src]
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
Apply an ElemFn
to an element selected with the provided Selector
.
impl ApplyToElem<IndexSelector> for MaskedData<bool>
[src]
fn apply_to_elem<F: ElemFn>(
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
[src]
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
Apply an ElemFn
to an element selected with the provided Selector
.
impl ApplyToElem<IndexSelector> for MaskedData<f64>
[src]
fn apply_to_elem<F: ElemFn>(
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
[src]
&self,
f: F,
select: IndexSelector
) -> Result<F::Output>
Apply an ElemFn
to an element selected with the provided Selector
.
impl ApplyToField<NilSelector> for MaskedData<u64>
[src]
fn apply_to_field<F: FieldFn>(&self, f: F, _: NilSelector) -> Result<F::Output>
[src]
Apply a FieldFn
to a field selected with the provided Selector
.
impl ApplyToField<NilSelector> for MaskedData<i64>
[src]
fn apply_to_field<F: FieldFn>(&self, f: F, _: NilSelector) -> Result<F::Output>
[src]
Apply a FieldFn
to a field selected with the provided Selector
.
impl ApplyToField<NilSelector> for MaskedData<String>
[src]
fn apply_to_field<F: FieldFn>(&self, f: F, _: NilSelector) -> Result<F::Output>
[src]
Apply a FieldFn
to a field selected with the provided Selector
.
impl ApplyToField<NilSelector> for MaskedData<bool>
[src]
fn apply_to_field<F: FieldFn>(&self, f: F, _: NilSelector) -> Result<F::Output>
[src]
Apply a FieldFn
to a field selected with the provided Selector
.
impl ApplyToField<NilSelector> for MaskedData<f64>
[src]
fn apply_to_field<F: FieldFn>(&self, f: F, _: NilSelector) -> Result<F::Output>
[src]
Apply a FieldFn
to a field selected with the provided Selector
.
impl<T: Serialize> Serialize for MaskedData<T>
[src]
Auto Trait Implementations
impl<T> Send for MaskedData<T> where
T: Send,
T: Send,
impl<T> Sync for MaskedData<T> where
T: Sync,
T: Sync,