Struct libffi::high::arity0::Closure0 [−][src]
pub struct Closure0<'a, R> { /* fields omitted */ }
An immutable, typed closure with the given argument and result types.
Implementations
impl<'a, R> Closure0<'a, R>
[src]
impl<'a, R> Closure0<'a, R>
[src]pub fn code_ptr(&self) -> &extern "C" fn() -> R
[src]
pub fn code_ptr(&self) -> &extern "C" fn() -> R
[src]Gets the C code pointer that is used to invoke the closure.
pub fn from_parts<U>(
cif: Cif0<R>,
callback: Callback0<U, R>,
userdata: &'a U
) -> Self
[src]
pub fn from_parts<U>(
cif: Cif0<R>,
callback: Callback0<U, R>,
userdata: &'a U
) -> Self
[src]Constructs a typed closure callable from C from a CIF describing the calling convention for the resulting function, a callback for the function to call, and userdata to pass to the callback.
impl<'a, R> Closure0<'a, R>
[src]
impl<'a, R> Closure0<'a, R>
[src]pub fn new_with_cif<Callback>(cif: Cif0<R>, callback: &'a Callback) -> Self where
Callback: Fn() -> R + 'a,
[src]
pub fn new_with_cif<Callback>(cif: Cif0<R>, callback: &'a Callback) -> Self where
Callback: Fn() -> R + 'a,
[src]Constructs a typed closure callable from C from a CIF describing the calling convention for the resulting function and the Rust closure to call.