pub trait HasPart<SomePart: Part>: PartialRefTarget {
// Required methods
unsafe fn part_ptr(
ptr: *const Self::RawTarget,
) -> <SomePart::PartType as PartType>::Ptr;
unsafe fn part_ptr_mut(
ptr: *mut Self::RawTarget,
) -> <SomePart::PartType as PartType>::PtrMut;
}
Expand description
Implemented when a reference target has a part.
This trait provides methods for unchecked access to a part of a reference target. Implementations for this are automatically created when deriving PartialRefTarget.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.