Trait foreign_types::ForeignTypeRef [−][src]
pub trait ForeignTypeRef { type CType; pub unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self { ... } pub unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self { ... } pub fn as_ptr(&self) -> *mut Self::CType { ... } }
A trait implemented by types which reference borrowed foreign types.
Associated Types
Loading content...Provided methods
pub unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
[src]
Constructs a shared instance of this type from its raw type.
pub unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
[src]
Constructs a mutable reference of this type from its raw type.
pub fn as_ptr(&self) -> *mut Self::CType
[src]
Returns a raw pointer to the wrapped value.