pub trait MutContainer<T: ?Sized>:
FragileMutContainer<T>
+ TryMutContainer<T>
+ Container<T> { }Expand description
An abstraction over some container which owns a T and can infallibly provide mutable or
immutable references to it, or attempt to be consumed to return the inner T
(if T is Sized).
§None values
Note that into_inner is still permitted to return None, even though get_ref and
get_mut do not fail, and most implementors should make try_get_ref and try_get_mut
infallible as well. A container should clearly document when into_inner returns None.
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.