Struct yew_hooks::UseMapHandle
source · [−]pub struct UseMapHandle<K, V> { /* private fields */ }Expand description
State handle for the use_map hook.
Implementations
sourceimpl<K, V> UseMapHandle<K, V>
impl<K, V> UseMapHandle<K, V>
sourcepub fn insert(&self, k: K, v: V) -> Option<V> where
K: Eq + Hash,
pub fn insert(&self, k: K, v: V) -> Option<V> where
K: Eq + Hash,
Inserts a key-value pair into the map.
sourcepub fn remove(&self, k: &K) -> Option<V> where
K: Eq + Hash,
pub fn remove(&self, k: &K) -> Option<V> where
K: Eq + Hash,
Removes a key from the map, returning the value at the key if the key was previously in the map.
Trait Implementations
sourceimpl<K, V> Clone for UseMapHandle<K, V>
impl<K, V> Clone for UseMapHandle<K, V>
sourceimpl<K, V> PartialEq<UseMapHandle<K, V>> for UseMapHandle<K, V> where
K: Eq + Hash,
V: PartialEq,
impl<K, V> PartialEq<UseMapHandle<K, V>> for UseMapHandle<K, V> where
K: Eq + Hash,
V: PartialEq,
Auto Trait Implementations
impl<K, V> !RefUnwindSafe for UseMapHandle<K, V>
impl<K, V> !Send for UseMapHandle<K, V>
impl<K, V> !Sync for UseMapHandle<K, V>
impl<K, V> Unpin for UseMapHandle<K, V>
impl<K, V> !UnwindSafe for UseMapHandle<K, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
sourcepub fn into_prop_value(self) -> Option<T>
pub fn into_prop_value(self) -> Option<T>
Convert self to a value of a Properties struct.
sourceimpl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
sourcepub fn into_prop_value(self) -> T
pub fn into_prop_value(self) -> T
Convert self to a value of a Properties struct.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more