Struct libffi::high::arity5::ClosureOnce5
[−]
[src]
pub struct ClosureOnce5<A, B, C, D, E, R> { /* fields omitted */ }
A one-shot, typed closure with the given argument and result types.
Methods
impl<A: CType, B: CType, C: CType, D: CType, E: CType, R: CType> ClosureOnce5<A, B, C, D, E, R>
[src]
pub fn new<Callback>(callback: Callback) -> Self where
Callback: FnOnce(A, B, C, D, E) -> R + Any,
[src]
Callback: FnOnce(A, B, C, D, E) -> R + Any,
Constructs a typed closure callable from C from a Rust closure.
impl<A: Copy, B: Copy, C: Copy, D: Copy, E: Copy, R> ClosureOnce5<A, B, C, D, E, R>
[src]
pub fn new_with_cif<Callback>(
cif: Cif5<A, B, C, D, E, R>,
callback: Callback
) -> Self where
Callback: FnOnce(A, B, C, D, E) -> R + Any,
[src]
cif: Cif5<A, B, C, D, E, R>,
callback: Callback
) -> Self where
Callback: FnOnce(A, B, C, D, E) -> R + Any,
Constructs a one-shot closure callable from C from a CIF describing the calling convention for the resulting function and the Rust closure to call.
impl<A, B, C, D, E, R> ClosureOnce5<A, B, C, D, E, R>
[src]
pub fn code_ptr(&self) -> &extern "C" fn(_: A, _: B, _: C, _: D, _: E) -> R
[src]
Gets the C code pointer that is used to invoke the closure.
pub fn from_parts<U: Any>(
cif: Cif5<A, B, C, D, E, R>,
callback: CallbackOnce5<U, A, B, C, D, E, R>,
userdata: U
) -> Self
[src]
cif: Cif5<A, B, C, D, E, R>,
callback: CallbackOnce5<U, A, B, C, D, E, R>,
userdata: U
) -> Self
Constructs a one-shot 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.