pub struct MappedRef<'a, K, V, T, S = RandomState> { /* private fields */ }
Implementations
sourceimpl<'a, K: Eq + Hash, V, T, S: BuildHasher> MappedRef<'a, K, V, T, S>
impl<'a, K: Eq + Hash, V, T, S: BuildHasher> MappedRef<'a, K, V, T, S>
pub fn key(&self) -> &K
pub fn value(&self) -> &T
pub fn pair(&self) -> (&K, &T)
pub fn map<F, T2>(self, f: F) -> MappedRef<'a, K, V, T2, S> where
F: FnOnce(&T) -> &T2,
pub fn try_map<F, T2>(self, f: F) -> Result<MappedRef<'a, K, V, T2, S>, Self> where
F: FnOnce(&T) -> Option<&T2>,
Trait Implementations
Auto Trait Implementations
impl<'a, K, V, T, S = RandomState> !RefUnwindSafe for MappedRef<'a, K, V, T, S>
impl<'a, K, V, T, S = RandomState> !Send for MappedRef<'a, K, V, T, S>
impl<'a, K, V, T, S = RandomState> !Sync for MappedRef<'a, K, V, T, S>
impl<'a, K, V, T, S> Unpin for MappedRef<'a, K, V, T, S>
impl<'a, K, V, T, S = RandomState> !UnwindSafe for MappedRef<'a, K, V, T, S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more