pub trait Key:
Copy
+ Clone
+ PartialEq
+ Eq
+ Hash
+ Debug {
type Raw: Copy + Clone + PartialEq + Eq + Hash + Debug;
// Required methods
unsafe fn from_raw(raw: Self::Raw, map_id: u64) -> Self;
fn from_parts(index: u32, generation: Generation, map_id: u64) -> Self;
fn index(&self) -> u32;
fn generation(&self) -> Generation;
fn raw(&self) -> Self::Raw;
fn map_id(&self) -> u64;
}Required Associated Types§
Required Methods§
Sourceunsafe fn from_raw(raw: Self::Raw, map_id: u64) -> Self
unsafe fn from_raw(raw: Self::Raw, map_id: u64) -> Self
Reconstructs a key from its raw representation.
§Safety
raw must represent a valid key layout created by Key::raw, with a
generation in the range 1..=Generation::MAX_VALUE.
fn from_parts(index: u32, generation: Generation, map_id: u64) -> Self
fn index(&self) -> u32
fn generation(&self) -> Generation
fn raw(&self) -> Self::Raw
fn map_id(&self) -> u64
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".