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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<T, A> AsPtr for Poly<[T], A>where
A: AllocatorCore,
Safety: Slices never return a null pointer.
impl<T, A> AsPtr for Poly<[T], A>where
A: AllocatorCore,
Safety: Slices never return a null pointer.
Source§impl<T> AsPtr for MutSlicePtr<'_, T>
Safety: SlicePtr may only contain non-null pointers.
impl<T> AsPtr for MutSlicePtr<'_, T>
Safety: SlicePtr may only contain non-null pointers.