pub struct IsMutable<M: Mutability>(/* private fields */);
Expand description
The existence of a value of this type guarantees that a specific mutability parameter M
is Mutable
.
Unsafe code may rely on this guarantee.
You can obtain this value by matching over M::mutability()
.
The most notable API that requires this is GenRef::gen_{into,from}_mut
.
Trait Implementations§
impl<M: Copy + Mutability> Copy for IsMutable<M>
Auto Trait Implementations§
impl<M> Freeze for IsMutable<M>
impl<M> RefUnwindSafe for IsMutable<M>where
M: RefUnwindSafe,
impl<M> Send for IsMutable<M>where
M: Send,
impl<M> Sync for IsMutable<M>where
M: Sync,
impl<M> Unpin for IsMutable<M>where
M: Unpin,
impl<M> UnwindSafe for IsMutable<M>where
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more