Skip to main content

SingletonBound

Trait SingletonBound 

Source
pub trait SingletonBound {
    type UnderlyingBound: Boundedness + ApplyMonotoneStream<Proved, Self::StreamToMonotone>;
    type StreamToMonotone: SingletonBound<UnderlyingBound = Self::UnderlyingBound>;

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

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

In addition to Bounded (immutable) and Unbounded (arbitrarily mutable), this also includes an additional variant Monotonic, which means that the value will only grow.

Required Associated Types§

Source

type UnderlyingBound: Boundedness + ApplyMonotoneStream<Proved, Self::StreamToMonotone>

The Boundedness that this Singleton would be erased to.

Source

type StreamToMonotone: SingletonBound<UnderlyingBound = Self::UnderlyingBound>

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

Required Methods§

Source

fn bound_kind() -> SingletonBoundKind

Returns the SingletonBoundKind 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§