pub trait OptionalBound {
type UnderlyingBound: Boundedness;
// Required method
fn bound_kind() -> OptionalBoundKind;
}Expand description
A marker trait indicating the boundedness of an Optional.
In addition to Bounded (immutable) and Unbounded (arbitrarily mutable, including
becoming null again), this also includes additional variants that constrain how the
optional’s presence (whether it is null) and value evolve over time.
The currently defined variants form a hierarchy of increasing strength; variants other than
Bounded erase to Unbounded:
Required Associated Types§
Sourcetype UnderlyingBound: Boundedness
type UnderlyingBound: Boundedness
The Boundedness that this Optional would be erased to.
Required Methods§
Sourcefn bound_kind() -> OptionalBoundKind
fn bound_kind() -> OptionalBoundKind
Returns the OptionalBoundKind corresponding to this type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".