Trait agnes::apply::FieldFn
[−]
[src]
pub trait FieldFn { type Output; fn apply_unsigned<T: DataIndex<u64>>(&mut self, field: &T) -> Self::Output; fn apply_signed<T: DataIndex<i64>>(&mut self, field: &T) -> Self::Output; fn apply_text<T: DataIndex<String>>(&mut self, field: &T) -> Self::Output; fn apply_boolean<T: DataIndex<bool>>(&mut self, field: &T) -> Self::Output; fn apply_float<T: DataIndex<f64>>(&mut self, field: &T) -> Self::Output; }
Trait for a type-dependent function that applies to a single field.
Associated Types
type Output
The desired output of this function.
Required Methods
fn apply_unsigned<T: DataIndex<u64>>(&mut self, field: &T) -> Self::Output
The method to use when working with unsigned (u64
) data.
fn apply_signed<T: DataIndex<i64>>(&mut self, field: &T) -> Self::Output
The method to use when working with signed (i64
) data.
fn apply_text<T: DataIndex<String>>(&mut self, field: &T) -> Self::Output
The method to use when working with text (String
) data.
fn apply_boolean<T: DataIndex<bool>>(&mut self, field: &T) -> Self::Output
The method to use when working with boolean (bool
) data.
fn apply_float<T: DataIndex<f64>>(&mut self, field: &T) -> Self::Output
The method to use when working with floating-point (f64
) data.
Implementors
impl<F: Fn(&u64) -> bool> FieldFn for FilterFnUnsigned<F> type Output = Vec<usize>;
impl<F: Fn(&i64) -> bool> FieldFn for FilterFnSigned<F> type Output = Vec<usize>;
impl<F: Fn(&String) -> bool> FieldFn for FilterFnText<F> type Output = Vec<usize>;
impl<F: Fn(&bool) -> bool> FieldFn for FilterFnBoolean<F> type Output = Vec<usize>;
impl<F: Fn(&f64) -> bool> FieldFn for FilterFnFloat<F> type Output = Vec<usize>;
impl<F: Fn(&u64) -> bool> FieldFn for MatchesAllFnUnsigned<F> type Output = bool;
impl<F: Fn(&i64) -> bool> FieldFn for MatchesAllFnSigned<F> type Output = bool;
impl<F: Fn(&String) -> bool> FieldFn for MatchesAllFnText<F> type Output = bool;
impl<F: Fn(&bool) -> bool> FieldFn for MatchesAllFnBoolean<F> type Output = bool;
impl<F: Fn(&f64) -> bool> FieldFn for MatchesAllFnFloat<F> type Output = bool;
impl FieldFn for SortOrderFn type Output = Vec<usize>;