Skip to main content

KeyedSingletonBound

Trait KeyedSingletonBound 

Source
pub trait KeyedSingletonBound {
    type UnderlyingBound: Boundedness;
    type ValueBound: Boundedness;
    type WithBoundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Bounded, EraseMonotonic = Self::WithBoundedValue>;
    type KeyedStreamToMonotone: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Self::ValueBound>;
    type KeyedStreamToNonMonotone: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Self::ValueBound>;
    type EraseMonotonic: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Self::ValueBound>;

    // Required method
    fn bound_kind() -> KeyedSingletonBoundKind;
}
Expand description

A marker trait indicating which components of a KeyedSingleton may change.

In addition to Bounded (all entries are fixed) and Unbounded (entries may be added / changed, but not removed), this also includes an additional variant BoundedValue, which indicates that entries may be added over time, but once an entry is added it will never be removed and its value will never change.

Required Associated Types§

Source

type UnderlyingBound: Boundedness

The Boundedness of the Stream underlying the keyed singleton.

Source

type ValueBound: Boundedness

The Boundedness of each entry’s value; Bounded means it is immutable.

Source

type WithBoundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Bounded, EraseMonotonic = Self::WithBoundedValue>

The type of the keyed singleton if the value for each key is immutable.

Source

type KeyedStreamToMonotone: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Self::ValueBound>

The Boundedness of this Singleton if it is produced from a KeyedStream with Self boundedness.

Source

type KeyedStreamToNonMonotone: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Self::ValueBound>

The Boundedness of the keyed singleton produced by folding a KeyedStream with Self boundedness when the aggregation does not have a monotonicity proof.

Without a monotonicity proof, the per-key values may change arbitrarily, so an unbounded input collapses to MonotonicKeys (keys are still only added, never removed).

Source

type EraseMonotonic: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Self::ValueBound>

The type of the keyed singleton if the value for each key is no longer monotonic.

Required Methods§

Source

fn bound_kind() -> KeyedSingletonBoundKind

Returns the KeyedSingletonBoundKind corresponding to this type.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl KeyedSingletonBound for Bounded

Source§

impl KeyedSingletonBound for BoundedValue

Source§

impl KeyedSingletonBound for MonotonicKeys

Source§

impl KeyedSingletonBound for MonotonicValue

Source§

impl KeyedSingletonBound for Unbounded