reflike

Trait RefMut

Source
pub trait RefMut<'a, T> {
    // Required method
    fn from_ref_mut(val: &'a mut T) -> Self;
}
Expand description

A trait for things that are “close enough” to &'a mut T.

Required Methods§

Source

fn from_ref_mut(val: &'a mut T) -> Self

Obtains this value from a mutable reference, showing that it’s possible.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, K, V, R: Ref<'a, K>> RefMut<'a, (K, V)> for (R, &'a mut V)

Pull the key out of a key-value pair.

Source§

fn from_ref_mut(val: &'a mut (K, V)) -> (R, &'a mut V)

Source§

impl<'a, T> RefMut<'a, T> for &'a mut T

Identity implementation.

Implementors§