pub struct IsShared<M: Mutability>(/* private fields */);
Expand description
The existence of a value of this type guarantees that a specific mutability parameter M
is Shared
.
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}_shared
.
Trait Implementations§
Auto Trait Implementations§
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