pub struct SlotMapKey(/* private fields */);Expand description
A key of a SlotMap, RelocatableSlotMap or FixedSizeSlotMap that identifies a
value.
Implementations§
Source§impl SlotMapKey
impl SlotMapKey
Sourcepub fn new(value: usize) -> Self
pub fn new(value: usize) -> Self
Creates a new SlotMapKey with the specified value.
Sourcepub fn value(&self) -> usize
pub fn value(&self) -> usize
Returns the underlying value of the SlotMapKey.
Trait Implementations§
Source§impl Clone for SlotMapKey
impl Clone for SlotMapKey
Source§fn clone(&self) -> SlotMapKey
fn clone(&self) -> SlotMapKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SlotMapKey
impl Debug for SlotMapKey
Source§impl Hash for SlotMapKey
impl Hash for SlotMapKey
Source§impl Ord for SlotMapKey
impl Ord for SlotMapKey
Source§fn cmp(&self, other: &SlotMapKey) -> Ordering
fn cmp(&self, other: &SlotMapKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SlotMapKey
impl PartialEq for SlotMapKey
Source§impl PartialOrd for SlotMapKey
impl PartialOrd for SlotMapKey
impl Copy for SlotMapKey
impl Eq for SlotMapKey
impl StructuralPartialEq for SlotMapKey
Auto Trait Implementations§
impl Freeze for SlotMapKey
impl RefUnwindSafe for SlotMapKey
impl Send for SlotMapKey
impl Sync for SlotMapKey
impl Unpin for SlotMapKey
impl UnwindSafe for SlotMapKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more