pub trait Two: Sized {
// Required method
fn two() -> Self;
// Provided methods
fn is_two(&self) -> bool
where Self: PartialEq<Self> { ... }
fn is_non_two(&self) -> bool
where Self: PartialEq<Self> { ... }
}Expand description
Define the 2 representation for the number
Required Methods§
Provided Methods§
fn is_two(&self) -> boolwhere
Self: PartialEq<Self>,
fn is_non_two(&self) -> boolwhere
Self: PartialEq<Self>,
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.