pub struct HashTable(/* private fields */);Implementations§
Source§impl HashTable
impl HashTable
pub fn new(hash: Procedure, eq: Procedure) -> Self
pub fn with_capacity(hash: Procedure, eq: Procedure, cap: usize) -> Self
pub fn size(&self) -> usize
pub fn get(&self, key: &Value, default: &Value) -> Result<Value, Exception>
pub fn set(&self, key: &Value, val: &Value) -> Result<(), Exception>
pub fn delete(&self, key: &Value) -> Result<(), Exception>
pub fn contains(&self, key: &Value) -> Result<bool, Exception>
pub fn update( &self, key: &Value, proc: &Procedure, default: &Value, ) -> Result<(), Exception>
pub fn copy(&self, mutable: bool) -> Self
pub fn clear(&self) -> Result<(), Exception>
pub fn keys(&self) -> Vec<Value>
pub fn entries(&self) -> (Vec<Value>, Vec<Value>)
Trait Implementations§
Source§impl From<HashTable> for UnpackedValue
impl From<HashTable> for UnpackedValue
Source§impl TryFrom<UnpackedValue> for HashTable
impl TryFrom<UnpackedValue> for HashTable
Auto Trait Implementations§
impl Freeze for HashTable
impl !RefUnwindSafe for HashTable
impl Send for HashTable
impl Sync for HashTable
impl Unpin for HashTable
impl !UnwindSafe for HashTable
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