pub trait Square {
type Output;
// Required method
fn square(&self) -> Self::Output;
}Expand description
Unary operator for retrieving the squared value.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".