Trait enum_ptr::FieldDerefMut
source · pub unsafe trait FieldDerefMut {
type Target<'a>
where Self: 'a;
// Required method
fn deref_mut(&mut self) -> Self::Target<'_>;
}Expand description
Types that can be used by get_mut and to derive
CompactBorrowMut.
It’s like DerefMut but with flexible targets and strict constraints.
Safety
T must not deref_mut to something that points to its own memory.
A counter-example is ManuallyDrop<T>, which will deref_mut to &mut T.