glib::translate

Trait Ptr

Source
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§

Source

fn is_null(&self) -> bool

Source

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

Source

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§

Source§

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

Source§

fn is_null(&self) -> bool

Source§

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

Source§

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

Source§

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

Source§

fn is_null(&self) -> bool

Source§

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

Source§

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

Implementors§