GetMut

Trait GetMut 

Source
pub trait GetMut<T>: Get<T> {
    // Required method
    fn get_mut<Q>(&mut self, index: Q) -> Option<&mut T>
       where Q: Borrow<Self::Key>;
}
Expand description

GetMut defines an interface for entities that can be accessed by a key; the design is similar to the IndexMut trait in the standard library

Required Methods§

Source

fn get_mut<Q>(&mut self, index: Q) -> Option<&mut T>
where Q: Borrow<Self::Key>,

returns a mutable reference to the element at the specified index.

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.

Implementors§