Trait rdkafka::util::IntoOpaque[][src]

pub trait IntoOpaque: Send + Sync {
    fn as_ptr(&self) -> *mut c_void;
unsafe fn from_ptr(_: *mut c_void) -> Self; }

Converts Rust data to and from raw pointers.

This conversion is used to pass opaque objects to the C library and vice versa.

Required methods

fn as_ptr(&self) -> *mut c_void[src]

Converts the object into a raw pointer.

unsafe fn from_ptr(_: *mut c_void) -> Self[src]

Converts the raw pointer back to the original Rust object.

Safety

The pointer must be a valid pointer to the original Rust object.

Loading content...

Implementations on Foreign Types

impl IntoOpaque for ()[src]

impl IntoOpaque for usize[src]

impl<T: Send + Sync> IntoOpaque for Box<T>[src]

impl<T: Send + Sync> IntoOpaque for Arc<T>[src]

Loading content...

Implementors

Loading content...