Trait tea_core::prelude::AggBasic

source ·
pub trait AggBasic: IntoIterator + Sized {
    // Provided methods
    fn count_value(self, value: Self::Item) -> usize
       where Self::Item: PartialEq { ... }
    fn any(self) -> bool
       where Self::Item: BoolType { ... }
    fn first(self) -> Option<Self::Item> { ... }
    fn last(self) -> Option<Self::Item>
       where Self::IntoIter: DoubleEndedIterator { ... }
    fn all(self) -> bool
       where Self::Item: BoolType { ... }
    fn n_sum(self) -> (usize, Option<Self::Item>)
       where Self::Item: Zero { ... }
    fn sum(self) -> Option<Self::Item>
       where Self::Item: Zero { ... }
    fn mean(self) -> Option<f64>
       where Self::Item: Zero + Cast<f64> { ... }
    fn max(self) -> Option<Self::Item>
       where Self::Item: Number { ... }
    fn min(self) -> Option<Self::Item>
       where Self::Item: Number { ... }
    fn argmax(self) -> Option<usize>
       where Self::Item: PartialOrd { ... }
    fn argmin(self) -> Option<usize>
       where Self::Item: PartialOrd { ... }
}

Provided Methods§

source

fn count_value(self, value: Self::Item) -> usize
where Self::Item: PartialEq,

source

fn any(self) -> bool
where Self::Item: BoolType,

source

fn first(self) -> Option<Self::Item>

Returns the first element of the iterator. If the iterator is empty, returns None.

source

fn last(self) -> Option<Self::Item>

Returns the last element of the iterator. If the iterator is empty, returns None.

source

fn all(self) -> bool
where Self::Item: BoolType,

source

fn n_sum(self) -> (usize, Option<Self::Item>)
where Self::Item: Zero,

Returns the sum of all elements in the vector.

source

fn sum(self) -> Option<Self::Item>
where Self::Item: Zero,

Returns the sum of all elements in the vector.

source

fn mean(self) -> Option<f64>
where Self::Item: Zero + Cast<f64>,

source

fn max(self) -> Option<Self::Item>
where Self::Item: Number,

source

fn min(self) -> Option<Self::Item>
where Self::Item: Number,

source

fn argmax(self) -> Option<usize>
where Self::Item: PartialOrd,

source

fn argmin(self) -> Option<usize>
where Self::Item: PartialOrd,

Object Safety§

This trait is not object safe.

Implementors§