pub trait Raw<T>: Sized {
unsafe fn from_raw(raw: *mut T) -> Self;
fn as_raw(&self) -> *mut T;
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
Build Self
from a raw pointer
Safety
raw
must be a valid pointer to the representation of Self, and be allocated with libc::malloc