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>;
}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§
Sourcetype UnderlyingBound: Boundedness
type UnderlyingBound: Boundedness
The Boundedness of the Stream underlying the keyed singleton.
Sourcetype ValueBound: Boundedness
type ValueBound: Boundedness
The Boundedness of each entry’s value; Bounded means it is immutable.
Sourcetype WithBoundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Bounded>
type WithBoundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Bounded>
The type of the keyed singleton if the value for each key is immutable.
Sourcetype WithUnboundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Unbounded>
type WithUnboundedValue: KeyedSingletonBound<UnderlyingBound = Self::UnderlyingBound, ValueBound = Unbounded>
The type of the keyed singleton if the value for each key may change asynchronously.