pub struct DetMap { /* private fields */ }Expand description
A deterministic hash map with insertion-order iteration. Uses open addressing with Fibonacci hashing.
Implementations§
Source§impl DetMap
impl DetMap
pub fn new() -> Self
pub fn insert(&mut self, key: Value, value: Value)
pub fn get(&self, key: &Value) -> Option<&Value>
pub fn contains_key(&self, key: &Value) -> bool
pub fn remove(&mut self, key: &Value) -> Option<Value>
pub fn keys(&self) -> Vec<Value>
pub fn values_vec(&self) -> Vec<Value>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DetMap
impl !RefUnwindSafe for DetMap
impl !Send for DetMap
impl !Sync for DetMap
impl Unpin for DetMap
impl UnsafeUnpin for DetMap
impl !UnwindSafe for DetMap
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more