Trait reg_map::ArrayElem

source ·
pub trait ArrayElem<'a>: 'a + Sealed {
    type Target;

    // Required method
    unsafe fn from_nonnull(ptr: NonNull<Self::Target>) -> Self;
}
Expand description

Types that can be stored in a RegArray.

⚠️ This trait is sealed and cannot be implemented for types outside of this crate.

Required Associated Types§

source

type Target

The target type of the pointer stored in the array.

Required Methods§

source

unsafe fn from_nonnull(ptr: NonNull<Self::Target>) -> Self

Creates a new pointer to Self::Target.

§Safety
  • ptr must point to a valid instance of Self::Target;
  • ptr must be valid for the whole lifetime 'a.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, T: Integer, A: Access> ArrayElem<'a> for Reg<'a, T, A>

source§

impl<'a, T: ArrayElem<'a>, const N: usize> ArrayElem<'a> for RegArray<'a, T, N>

source§

type Target = [<T as ArrayElem<'a>>::Target; N]

source§

impl<'a, T: RegMapPtr<'a>> ArrayElem<'a> for T

source§

type Target = <T as RegMapPtr<'a>>::RegMap