pub unsafe trait Simple16: Sized + Copy {
// Required methods
fn check(data: &[Self]) -> Result<(), ValueOutOfRange>;
fn as_(self) -> u32;
}Expand description
This trait is unsafe because if check is wrong then undefined behavior can occur.
Required Methods§
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.