Struct dynamite::FFIObj[][src]

#[repr(C)]pub struct FFIObj { /* fields omitted */ }

A ref-counted pointer that can be sent over FFI

C Layout

Implementations

impl FFIObj[src]

pub fn new<T: Any + Send + Sync + 'static>(value: T) -> Self[src]

Create a new FFI compatible pointer to the given type

pub fn downcast_ref<T: Any>(self: &FFIObj) -> Option<&T>[src]

Downcast the FFI object to a specific type

Trait Implementations

impl Clone for FFIObj[src]

impl Drop for FFIObj[src]

impl ReprC for FFIObj where
    *const Erased: ReprC,
    <*const Erased as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    &'static VTable: ReprC,
    <&'static VTable as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>, 
[src]

type CLayout = FFIObj_Layout

The CType having the same layout as Self.

impl Send for FFIObj where
    Arc<dyn Any + Send + Sync + 'static>: Send
[src]

impl Sync for FFIObj where
    Arc<dyn Any + Send + Sync + 'static>: Sync
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.