Skip to main content

WrapMut

Trait WrapMut 

Source
pub trait WrapMut {
    type WrapMut<'a, T: ?Sized + 'a>: DerefMut<Target = T>;
}
Expand description

Generic exclusive/mutable reference type wrappers

Specialized version of Wrap that requires DerefMut, so you can mutate the underlying T even if the wrapper type is polymorphic.

If your wrapper type doesn’t implement DerefMut, you should implement the WrapRef trait instead.

Required Associated Types§

Source

type WrapMut<'a, T: ?Sized + 'a>: DerefMut<Target = T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl WrapMut for WBox

Wrap with Box

Source§

type WrapMut<'a, T: ?Sized + 'a> = Box<T>

Source§

impl WrapMut for WMut

Wrap with &mut

Source§

type WrapMut<'a, T: ?Sized + 'a> = &'a mut T

Source§

impl WrapMut for WMutexGuard

Wrap with MutexGuard

Source§

type WrapMut<'a, T: ?Sized + 'a> = MutexGuard<'a, T>

Source§

impl WrapMut for WRefCellMut

Wrap with RefMut

Source§

type WrapMut<'a, T: ?Sized + 'a> = RefMut<'a, T>