[][src]Struct safer_ffi::closure::arc::ArcDynFn1

#[repr(C)]pub struct ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
{ /* fields omitted */ }
This is supported on feature="alloc" only.

Arc<dyn 'static + Send + Sync + Fn(A1) -> Ret>

C Layout

Implementations

impl<Ret, A1> ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
[src]

pub fn new<F>(f: Arc<F>) -> Self where
    F: Fn(A1) -> Ret,
    F: Send + Sync + 'static, 
[src]

This is supported on feature="alloc" only.

impl<Ret, A1> ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
[src]

pub fn call(&self, A1: A1) -> Ret[src]

This is supported on feature="alloc" only.

Trait Implementations

impl<Ret, A1> Clone for ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
[src]

impl<Ret, A1> Debug for ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
[src]

impl<Ret, A1> Drop for ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
[src]

impl<Ret, A1> ReprC for ArcDynFn1<Ret, A1> where
    NonNull<c_void>: ReprC,
    <NonNull<c_void> as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    unsafe extern "C" fn(env_ptr: NonNull<c_void>, _: A1) -> Ret: ReprC,
    <unsafe extern "C" fn(env_ptr: NonNull<c_void>, _: A1) -> Ret as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    unsafe extern "C" fn(env_ptr: NonNull<c_void>): ReprC,
    <unsafe extern "C" fn(env_ptr: NonNull<c_void>) as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    Option<unsafe extern "C" fn(env_ptr: NonNull<c_void>)>: ReprC,
    <Option<unsafe extern "C" fn(env_ptr: NonNull<c_void>)> as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    Ret: ReprC,
    A1: ReprC,
    Ret: ReprC,
    A1: ReprC
[src]

type CLayout = ArcDynFn1_Layout<Ret, A1>

The CType having the same layout as Self.

impl<Ret, A1> Send for ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
[src]

Arc<dyn Send + Sync + ...> : Send

impl<Ret, A1> Sync for ArcDynFn1<Ret, A1> where
    Ret: ReprC,
    A1: ReprC
[src]

Arc<dyn Send + Sync + ...> : Sync

Auto Trait Implementations

impl<Ret, A1> RefUnwindSafe for ArcDynFn1<Ret, A1>

impl<Ret, A1> Unpin for ArcDynFn1<Ret, A1>

impl<Ret, A1> UnwindSafe for ArcDynFn1<Ret, A1>

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> ManuallyDropMut for T

type Ret = ManuallyDrop<T>

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.