use super::Pointer;
use core::ptr::NonNull;
const impl<Type> From<NonNull<Type>> for Pointer<Type> {
#[inline]
fn from(value: NonNull<Type>) -> Self {return Self {
to: Some(value)
}}
}
const impl<Type> From<Option<NonNull<Type>>> for Pointer<Type> {
#[inline]
fn from(value: Option<NonNull<Type>>) -> Self {return Self {
to: value
}}
}
const impl<Type> From<*mut Type> for Pointer<Type> {
#[inline]
fn from(value: *mut Type) -> Self {return Self {
to: NonNull::new(value)
}}
}
const impl<Type> From<&mut Type> for Pointer<Type> {
#[inline]
fn from(value: &mut Type) -> Self {Self::from(value as *mut Type)}
}