Trait FromRawPtr

Source
pub trait FromRawPtr {
    // Required method
    unsafe fn from_raw(ptr: *mut ()) -> Self;
}
Expand description

Convert from a raw ptr into a pointer

Required Methods§

Source

unsafe fn from_raw(ptr: *mut ()) -> Self

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<'a, T> FromRawPtr for &'a T

Source§

unsafe fn from_raw(ptr: *mut ()) -> &'a T

Source§

impl<T> FromRawPtr for Box<T>

Source§

unsafe fn from_raw(ptr: *mut ()) -> Box<T>

Source§

impl<T> FromRawPtr for Arc<T>

Source§

unsafe fn from_raw(ptr: *mut ()) -> Arc<T>

Implementors§