KeyedSingletonBound

Trait KeyedSingletonBound 

Source
pub trait KeyedSingletonBound {
    type UnderlyingBound: Boundedness;
    type ValueBound: Boundedness;
    type WithBoundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Bounded>;
    type WithUnboundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Unbounded>;

    // 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 / removed / changed), 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>

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

Source

type WithUnboundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Unbounded>

The type of the keyed singleton if the value for each key may change asynchronously.

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", so this trait is not object safe.

Implementors§