pub trait ClampFrom<F: Sized>: Sized {
// Required methods
fn clamp_from(other: F) -> Self;
fn saturating_clamp_from(other: F) -> Self;
fn try_clamp_from(other: F) -> Result<Self, ClampError>;
}Expand description
Trait for interpolation of clamped values between different types.
Required Methods§
fn clamp_from(other: F) -> Self
fn saturating_clamp_from(other: F) -> Self
fn try_clamp_from(other: F) -> Result<Self, ClampError>
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.