Trait Ptr

pub trait Ptr: Copy + 'static {
    // Required methods
    fn is_null(&self) -> bool;
    fn from<X>(ptr: *mut X) -> Self;
    fn to<X>(self) -> *mut X;
}
Expand description

A pointer

Required Methods§

fn is_null(&self) -> bool

fn from<X>(ptr: *mut X) -> Self

fn to<X>(self) -> *mut X

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.

Implementations on Foreign Types§

§

impl<T> Ptr for *const T
where T: 'static,

§

fn is_null(&self) -> bool

§

fn from<X>(ptr: *mut X) -> *const T

§

fn to<X>(self) -> *mut X

§

impl<T> Ptr for *mut T
where T: 'static,

§

fn is_null(&self) -> bool

§

fn from<X>(ptr: *mut X) -> *mut T

§

fn to<X>(self) -> *mut X

Implementors§