pub struct AsMap<K, V>(/* private fields */);Implementations§
Source§impl<K: Eq + Hash, V> AsMap<K, V>
impl<K: Eq + Hash, V> AsMap<K, V>
pub fn new(values: impl IntoIterator<Item = (K, V)>) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn assoc(&mut self, key: K, value: V) -> &mut Self
pub fn dissoc(&mut self, key: &K) -> &mut Self
pub fn empty(&mut self) -> &mut Self
pub fn find(&self, key: &K) -> Option<(&K, &V)>
pub fn get(&self, key: &K) -> Option<&V>
pub fn iter(&self) -> impl Iterator<Item = (&K, &V)>
Trait Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for AsMap<K, V>
impl<K, V> RefUnwindSafe for AsMap<K, V>where
HashMap<K, V>: RefUnwindSafe,
impl<K, V> Send for AsMap<K, V>
impl<K, V> Sync for AsMap<K, V>
impl<K, V> Unpin for AsMap<K, V>
impl<K, V> UnsafeUnpin for AsMap<K, V>where
HashMap<K, V>: UnsafeUnpin,
impl<K, V> UnwindSafe for AsMap<K, V>where
HashMap<K, V>: 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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