pub trait Half: Sized {
const HALF: Self;
// Provided methods
fn half() -> Self
where Self: Sized { ... }
fn set_half(&mut self) -> &mut Self { ... }
fn is_half(self) -> bool
where Self: PartialEq { ... }
fn is_not_half(self) -> bool
where Self: PartialEq { ... }
}Expand description
Define the 0.5 representation
Required Associated Constants§
Provided Methods§
fn half() -> Selfwhere
Self: Sized,
fn set_half(&mut self) -> &mut Self
fn is_half(self) -> boolwhere
Self: PartialEq,
fn is_not_half(self) -> boolwhere
Self: PartialEq,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".