Struct starlark_map::StarlarkHashValue
source · pub struct StarlarkHashValue(/* private fields */);
Expand description
A hash value.
Implementations§
source§impl StarlarkHashValue
impl StarlarkHashValue
sourcepub fn new<K: Hash + ?Sized>(key: &K) -> Self
pub fn new<K: Hash + ?Sized>(key: &K) -> Self
Create a new StarlarkHashValue
using the Hash
trait
for given key.
sourcepub const fn new_unchecked(hash: u32) -> Self
pub const fn new_unchecked(hash: u32) -> Self
Directly create a new StarlarkHashValue
using a hash.
The expectation is that the key will be well-swizzled,
or there may be many hash collisions.
Trait Implementations§
source§impl Allocative for StarlarkHashValue
impl Allocative for StarlarkHashValue
source§impl Clone for StarlarkHashValue
impl Clone for StarlarkHashValue
source§fn clone(&self) -> StarlarkHashValue
fn clone(&self) -> StarlarkHashValue
Returns a copy 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 StarlarkHashValue
impl Debug for StarlarkHashValue
source§impl Hash for StarlarkHashValue
impl Hash for StarlarkHashValue
source§impl PartialEq for StarlarkHashValue
impl PartialEq for StarlarkHashValue
source§fn eq(&self, other: &StarlarkHashValue) -> bool
fn eq(&self, other: &StarlarkHashValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for StarlarkHashValue
impl Eq for StarlarkHashValue
impl StructuralPartialEq for StarlarkHashValue
Auto Trait Implementations§
impl RefUnwindSafe for StarlarkHashValue
impl Send for StarlarkHashValue
impl Sync for StarlarkHashValue
impl Unpin for StarlarkHashValue
impl UnwindSafe for StarlarkHashValue
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.