[−][src]Macro foreign_types::foreign_type
A macro to easily define wrappers for foreign types.
Examples
use foreign_types::foreign_type; foreign_type! { /// Documentation for the owned type. pub unsafe type Ssl: Sync + Send { type CType = openssl_sys::SSL; fn drop = openssl_sys::SSL_free; fn clone = openssl_sys::SSL_dup; } /// This type immutably borrows other data and has a limited lifetime! pub unsafe type Thing<'a>: Send { type CType = foo_sys::THING; type PhantomData = &'a (); fn drop = foo_sys::THING_free; } }