pub enum MapKey {
Nil,
Bool(bool),
Int(i64),
Float(u64),
Str(Arc<str>),
Symbol(Arc<str>),
Keyword(Arc<str>),
}Expand description
Hashable subset of Value — every variant that has well-defined
equality and hashing semantics. Used as the key type for Value::Map.
Float keys are stored as raw bit patterns so two NaNs hash to the
same slot and equality is bit-exact. This trades IEEE-NaN-comparison
semantics for usability — keys round-trip correctly.
Variants§
Implementations§
Trait Implementations§
impl Eq for MapKey
impl StructuralPartialEq for MapKey
Auto Trait Implementations§
impl Freeze for MapKey
impl RefUnwindSafe for MapKey
impl Send for MapKey
impl Sync for MapKey
impl Unpin for MapKey
impl UnsafeUnpin for MapKey
impl UnwindSafe for MapKey
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