pub trait Unit {
// Required method
fn unit() -> Self;
}
Expand description
A trait for types that have a unit value.
E.g. 1 for integers, 1.0 for floats, etc.
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.