pub trait Raw<T>: Sized {
// Required methods
unsafe fn from_raw(raw: *mut T) -> Self;
fn as_raw(&self) -> *mut T;
// Provided method
fn into_raw(self) -> *mut T { ... }
}Expand description
Trait for types that own a C allocated pointer and are represented by the data pointed to.
Required Methods§
Provided Methods§
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.