Skip to main content

AggregateValue

Trait AggregateValue 

Source
pub trait AggregateValue: Copy + 'static {
    type Number: AggregateNumber;

    // Required method
    fn number(self) -> Self::Number;
}
Expand description

The value a selector of Sum or Avg returns: a number, or an Option of a number whose None counts as zero (the nullable overloads, valueSelector(t).GetValueOrDefault()).

Required Associated Types§

Source

type Number: AggregateNumber

The number the value counts as.

Required Methods§

Source

fn number(self) -> Self::Number

The number the value counts as: the value itself, or zero for a None.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AggregateValue for f32

Source§

impl AggregateValue for f64

Source§

impl AggregateValue for i32

Source§

impl AggregateValue for i64

Source§

impl<X: AggregateNumber> AggregateValue for Option<X>

Source§

type Number = X

Source§

fn number(self) -> X

Implementors§