pub trait Double: Sized {
// Required method
fn double(&self) -> Self;
// Provided method
fn double_in_place(&mut self) { ... }
}Expand description
Perform a doubling (i.e. self + self).
Required Methods§
Provided Methods§
Sourcefn double_in_place(&mut self)
fn double_in_place(&mut self)
Double this value in-place, assigning self + self to 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.