Struct libffi::high::arity11::ClosureOnce11
source · pub struct ClosureOnce11<A, B, C, D, E, F, G, H, I, J, K, R> { /* private fields */ }
Expand description
A one-shot, typed closure with the given argument and result types.
Implementations§
source§impl<A: CType, B: CType, C: CType, D: CType, E: CType, F: CType, G: CType, H: CType, I: CType, J: CType, K: CType, R: CType> ClosureOnce11<A, B, C, D, E, F, G, H, I, J, K, R>
impl<A: CType, B: CType, C: CType, D: CType, E: CType, F: CType, G: CType, H: CType, I: CType, J: CType, K: CType, R: CType> ClosureOnce11<A, B, C, D, E, F, G, H, I, J, K, R>
source§impl<A: Copy, B: Copy, C: Copy, D: Copy, E: Copy, F: Copy, G: Copy, H: Copy, I: Copy, J: Copy, K: Copy, R: CType> ClosureOnce11<A, B, C, D, E, F, G, H, I, J, K, R>
impl<A: Copy, B: Copy, C: Copy, D: Copy, E: Copy, F: Copy, G: Copy, H: Copy, I: Copy, J: Copy, K: Copy, R: CType> ClosureOnce11<A, B, C, D, E, F, G, H, I, J, K, R>
sourcepub fn new_with_cif<Callback>(
cif: Cif11<A, B, C, D, E, F, G, H, I, J, K, R>,
callback: Callback
) -> Selfwhere
Callback: FnOnce(A, B, C, D, E, F, G, H, I, J, K) -> R + Any,
pub fn new_with_cif<Callback>( cif: Cif11<A, B, C, D, E, F, G, H, I, J, K, R>, callback: Callback ) -> Selfwhere Callback: FnOnce(A, B, C, D, E, F, G, H, I, J, K) -> 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.
source§impl<A, B, C, D, E, F, G, H, I, J, K, R: CType> ClosureOnce11<A, B, C, D, E, F, G, H, I, J, K, R>
impl<A, B, C, D, E, F, G, H, I, J, K, R: CType> ClosureOnce11<A, B, C, D, E, F, G, H, I, J, K, R>
sourcepub fn code_ptr(&self) -> &FnPtr11<'_, A, B, C, D, E, F, G, H, I, J, K, R>
pub fn code_ptr(&self) -> &FnPtr11<'_, A, B, C, D, E, F, G, H, I, J, K, R>
Gets the C code pointer that is used to invoke the closure.
sourcepub fn from_parts<U: Any>(
cif: Cif11<A, B, C, D, E, F, G, H, I, J, K, R>,
callback: CallbackOnce11<U, A, B, C, D, E, F, G, H, I, J, K, R::RetType>,
userdata: U
) -> Self
pub fn from_parts<U: Any>( cif: Cif11<A, B, C, D, E, F, G, H, I, J, K, R>, callback: CallbackOnce11<U, A, B, C, D, E, F, G, H, I, J, K, R::RetType>, 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. Note that the return type of the callback must follow the libffi implicit extension rules.