Skip to main content

AsPtr

Trait AsPtr 

Source
pub unsafe trait AsPtr {
    type Type;

    // Required method
    fn as_ptr(&self) -> *const Self::Type;
}
Expand description

Obtain a constant base pointer for a slice of data.

§Safety

The returned pointer must never be null!

Required Associated Types§

Required Methods§

Source

fn as_ptr(&self) -> *const Self::Type

Implementors§

Source§

impl<T> AsPtr for MutSlicePtr<'_, T>

Safety: SlicePtr may only contain non-null pointers.

Source§

type Type = T

Source§

impl<T> AsPtr for SlicePtr<'_, T>

Safety: SlicePtr may only contain non-null pointers.

Source§

type Type = T

Source§

impl<T, A> AsPtr for Poly<[T], A>
where A: AllocatorCore,

Safety: Slices never return a null pointer.

Source§

type Type = T