Skip to main content

AggregateBuilder

Struct AggregateBuilder 

Source
pub struct AggregateBuilder<N, K, L, W, WV, A, S: State = Empty>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field,
{ /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<N, K, L, W, WV, A, S: State> AggregateBuilder<N, K, L, W, WV, A, S>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field,

Source

pub fn build(self) -> Aggregate<N, K, L, W, WV, A>
where S: IsComplete,

Finish building and return the requested object

Source

pub fn items( self, value: usize, ) -> AggregateBuilder<N, K, L, W, WV, A, SetItems<S>>
where S::Items: IsUnset,

Optional (Some / Option setters). Default: 0.

Over how many items the aggregate has been taken.

Source

pub fn maybe_items( self, value: Option<usize>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetItems<S>>
where S::Items: IsUnset,

Optional (Some / Option setters). Default: 0.

Over how many items the aggregate has been taken.

Source

pub fn names( self, value: BTreeMap<N, usize>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetNames<S>>
where S::Names: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Name occurrence.

Source

pub fn maybe_names( self, value: Option<BTreeMap<N, usize>>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetNames<S>>
where S::Names: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Name occurrence.

Source

pub fn kinds( self, value: BTreeMap<K, usize>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetKinds<S>>
where S::Kinds: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Kind occurrence.

Source

pub fn maybe_kinds( self, value: Option<BTreeMap<K, usize>>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetKinds<S>>
where S::Kinds: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Kind occurrence.

Source

pub fn labels( self, value: BTreeMap<L, usize>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetLabels<S>>
where S::Labels: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Label occurrence.

Source

pub fn maybe_labels( self, value: Option<BTreeMap<L, usize>>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetLabels<S>>
where S::Labels: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Label occurrence.

Source

pub fn weights( self, value: BTreeMap<W, WV>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetWeights<S>>
where S::Weights: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Weight sum value.

Source

pub fn maybe_weights( self, value: Option<BTreeMap<W, WV>>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetWeights<S>>
where S::Weights: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Weight sum value.

Source

pub fn annotations( self, value: BTreeMap<A, usize>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetAnnotations<S>>
where S::Annotations: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Annotation key occurrence.

Source

pub fn maybe_annotations( self, value: Option<BTreeMap<A, usize>>, ) -> AggregateBuilder<N, K, L, W, WV, A, SetAnnotations<S>>
where S::Annotations: IsUnset,

Optional (Some / Option setters). Default: BTreeMap::new().

Annotation key occurrence.

Auto Trait Implementations§

§

impl<N, K, L, W, WV, A, S> Freeze for AggregateBuilder<N, K, L, W, WV, A, S>

§

impl<N, K, L, W, WV, A, S> RefUnwindSafe for AggregateBuilder<N, K, L, W, WV, A, S>

§

impl<N, K, L, W, WV, A, S> Send for AggregateBuilder<N, K, L, W, WV, A, S>
where N: Send, K: Send, L: Send, W: Send, WV: Send, A: Send,

§

impl<N, K, L, W, WV, A, S> Sync for AggregateBuilder<N, K, L, W, WV, A, S>
where N: Sync, K: Sync, L: Sync, W: Sync, WV: Sync, A: Sync,

§

impl<N, K, L, W, WV, A, S> Unpin for AggregateBuilder<N, K, L, W, WV, A, S>

§

impl<N, K, L, W, WV, A, S> UnsafeUnpin for AggregateBuilder<N, K, L, W, WV, A, S>

§

impl<N, K, L, W, WV, A, S> UnwindSafe for AggregateBuilder<N, K, L, W, WV, A, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.