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