pub trait HaveYAndOne<T>: HaveY<T> {
const Y: Self;
const UP: Self = Self::Y;
// Provided methods
fn up(self) -> Self
where Self: Add<Self, Output = Self> { ... }
fn down(self) -> Self
where Self: Sub<Self, Output = Self> { ... }
}Required Associated Constants§
Provided Associated Constants§
Provided 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.