pub struct ConstValueHash(pub ConstValue);Expand description
Wrapper for ConstValue that implements Eq and Hash.
Floats don’t implement Eq/Hash due to IEEE 754 NaN semantics (NaN != NaN). This wrapper uses bitwise comparison: two floats are equal if their bit patterns match. This means:
- NaN values with identical bit patterns are considered equal
- Different NaN representations are not equal
- This is consistent with hash consing requirements
Tuple Fields§
§0: ConstValueTrait Implementations§
Source§impl Clone for ConstValueHash
impl Clone for ConstValueHash
Source§fn clone(&self) -> ConstValueHash
fn clone(&self) -> ConstValueHash
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 ConstValueHash
impl Debug for ConstValueHash
Source§impl<'de> Deserialize<'de> for ConstValueHash
impl<'de> Deserialize<'de> for ConstValueHash
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ConstValueHash
impl Hash for ConstValueHash
Source§impl PartialEq for ConstValueHash
impl PartialEq for ConstValueHash
Source§impl Serialize for ConstValueHash
impl Serialize for ConstValueHash
impl Copy for ConstValueHash
impl Eq for ConstValueHash
Auto Trait Implementations§
impl Freeze for ConstValueHash
impl RefUnwindSafe for ConstValueHash
impl Send for ConstValueHash
impl Sync for ConstValueHash
impl Unpin for ConstValueHash
impl UnsafeUnpin for ConstValueHash
impl UnwindSafe for ConstValueHash
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.