pub unsafe trait Value: Sized {
// Required methods
fn into_raw(self) -> u64;
unsafe fn from_raw_unchecked(raw: u64) -> Self;
}Expand description
Values that can be safely stored in a SequentialMap.
§Safety
Implementer must guarantee that Self has the same memory layout as a u64.
Required Methods§
Sourceunsafe fn from_raw_unchecked(raw: u64) -> Self
unsafe fn from_raw_unchecked(raw: u64) -> Self
§Safety
Caller must guarantee that:
rawwas created by a previousValue::into_rawcall.from_rawis called at most once for eachValue::into_rawcall.- There are no live borrows when
Value::from_raw_uncheckedis called.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".