[][src]Struct ffishim::Function

pub struct Function {
    pub ffi_name: Ident,
    pub ffi_args: Vec<FnArg>,
    pub ffi_output: ReturnType,
    pub call_expr: Expr,
}

Derived from an ItemFn to generate its equivalent wrapper function.

The ToTokens implementation of this structure generates the code for the wrapper around the API's functions. This API performs all structure transformation required to obtain clean types in the rust code and return the FFI types back.

Fields

ffi_name: Identffi_args: Vec<FnArg>ffi_output: ReturnTypecall_expr: Expr

Implementations

impl Function[src]

pub fn from_item_fn(ifn: &ItemFn) -> Self[src]

Trait Implementations

impl Debug for Function[src]

impl ToTokens for Function[src]

Auto Trait Implementations

impl !RefUnwindSafe for Function

impl !Send for Function

impl !Sync for Function

impl Unpin for Function

impl UnwindSafe for Function

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> Spanned for T where
    T: Spanned + ?Sized
[src]

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.