pub trait Nullable: PartialEq + Sized {
const NONE: Self;
// Provided methods
fn is_none(&self) -> bool { ... }
fn is_some(&self) -> bool { ... }
}Expand description
Trait for types that can be None.
This trait is used to indicate that a type can reserve a specific value to
represent None.
Required Associated Constants§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".