pub trait Nullable {
const NULL: Self;
// Required method
fn is_null(&self) -> bool;
}
Expand description
Any type that can be some form of null.
Required Associated Constants§
Sourceconst NULL: Self
const NULL: Self
Whatever value of Self means null.
For *const _
, this is std::ptr::null()
.
For *mut _
, this is std::ptr::null_mut()
.
See also NoneIsNull
Required Methods§
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.