Trait Square
pub trait Square: Sizedwhere
&'a Self: for<'a> Mul<Output = Self>,{
// Provided method
fn square(&self) -> Self { ... }
}Expand description
Support for optimized squaring
Provided Methods§
fn square(&self) -> Self
fn square(&self) -> Self
Computes the same as self.mul(self), but may be more efficient.
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.