pub trait ClampAssign {
// Required methods
fn clamp_assign(&mut self, min: Self, max: Self);
fn clamp_min_assign(&mut self, min: Self);
fn clamp_max_assign(&mut self, max: Self);
}Expand description
Assigning trait for clamping a value.
Required Methods§
Sourcefn clamp_assign(&mut self, min: Self, max: Self)
fn clamp_assign(&mut self, min: Self, max: Self)
Clamp self to be within the range [min, max].
Sourcefn clamp_min_assign(&mut self, min: Self)
fn clamp_min_assign(&mut self, min: Self)
Clamp self to be within the range [min, ∞).
Sourcefn clamp_max_assign(&mut self, max: Self)
fn clamp_max_assign(&mut self, max: Self)
Clamp self to be within the range (-∞, max].
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.