pub unsafe trait ClampedInteger<T: Copy>:
'static
+ Default
+ Eq
+ Ord
+ InherentLimits<T> {
// Required methods
fn from_primitive(val: T) -> Result<Self>;
fn as_primitive(&self) -> &T;
// Provided methods
unsafe fn from_primitive_unchecked(val: T) -> Self { ... }
fn into_primitive(&self) -> T { ... }
}Required Methods§
fn from_primitive(val: T) -> Result<Self>
fn as_primitive(&self) -> &T
Provided Methods§
unsafe fn from_primitive_unchecked(val: T) -> Self
fn into_primitive(&self) -> T
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.