Trait foreign_types::ForeignType[][src]

pub trait ForeignType {
    type CType;
    type Ref: ForeignTypeRef;
    pub unsafe fn from_ptr(ptr: *mut Self::CType) -> Self;
pub fn as_ptr(&self) -> *mut Self::CType; }

A type implemented by wrappers over foreign types.

Associated Types

type CType[src]

The raw C type.

type Ref: ForeignTypeRef[src]

The type representing a reference to this type.

Loading content...

Required methods

pub unsafe fn from_ptr(ptr: *mut Self::CType) -> Self[src]

Constructs an instance of this type from its raw type.

pub fn as_ptr(&self) -> *mut Self::CType[src]

Returns a raw pointer to the wrapped value.

Loading content...

Implementors

Loading content...