Struct starlark::collections::Hashed
source · pub struct Hashed<K> { /* private fields */ }
Expand description
A key and its hash.
Implementations§
source§impl<K> Hashed<K>
impl<K> Hashed<K>
sourcepub fn new_unchecked(hash: StarlarkHashValue, key: K) -> Hashed<K>
pub fn new_unchecked(hash: StarlarkHashValue, key: K) -> Hashed<K>
Directly create a new Hashed
using a given hash value.
If the hash does not correspond to the key, its will cause issues.
sourcepub fn hash(&self) -> StarlarkHashValue
pub fn hash(&self) -> StarlarkHashValue
Get the underlying hash.
Trait Implementations§
source§impl<K> Allocative for Hashed<K>where
K: Allocative,
impl<K> Allocative for Hashed<K>where
K: Allocative,
source§impl<K> Ord for Hashed<K>where
K: Ord,
impl<K> Ord for Hashed<K>where
K: Ord,
source§impl<K> PartialEq for Hashed<K>where
K: PartialEq,
impl<K> PartialEq for Hashed<K>where
K: PartialEq,
source§impl<K> PartialOrd for Hashed<K>where
K: PartialOrd,
impl<K> PartialOrd for Hashed<K>where
K: PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<K> Copy for Hashed<K>where
K: Copy,
impl<K> Eq for Hashed<K>where
K: Eq,
impl<K> StructuralPartialEq for Hashed<K>
Auto Trait Implementations§
impl<K> RefUnwindSafe for Hashed<K>where
K: RefUnwindSafe,
impl<K> Send for Hashed<K>where
K: Send,
impl<K> Sync for Hashed<K>where
K: Sync,
impl<K> Unpin for Hashed<K>where
K: Unpin,
impl<K> UnwindSafe for Hashed<K>where
K: UnwindSafe,
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.