Struct libffi::high::arity7::ClosureOnce7
source · pub struct ClosureOnce7<A, B, C, D, E, F, G, 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, R: CType> ClosureOnce7<A, B, C, D, E, F, G, R>
impl<A: CType, B: CType, C: CType, D: CType, E: CType, F: CType, G: CType, R: CType> ClosureOnce7<A, B, C, D, E, F, G, R>
source§impl<A: Copy, B: Copy, C: Copy, D: Copy, E: Copy, F: Copy, G: Copy, R: CType> ClosureOnce7<A, B, C, D, E, F, G, R>
impl<A: Copy, B: Copy, C: Copy, D: Copy, E: Copy, F: Copy, G: Copy, R: CType> ClosureOnce7<A, B, C, D, E, F, G, R>
sourcepub fn new_with_cif<Callback>(
cif: Cif7<A, B, C, D, E, F, G, R>,
callback: Callback
) -> Selfwhere
Callback: FnOnce(A, B, C, D, E, F, G) -> R + Any,
pub fn new_with_cif<Callback>( cif: Cif7<A, B, C, D, E, F, G, R>, callback: Callback ) -> Selfwhere Callback: FnOnce(A, B, C, D, E, F, G) -> 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, R: CType> ClosureOnce7<A, B, C, D, E, F, G, R>
impl<A, B, C, D, E, F, G, R: CType> ClosureOnce7<A, B, C, D, E, F, G, R>
sourcepub fn code_ptr(&self) -> &FnPtr7<'_, A, B, C, D, E, F, G, R>
pub fn code_ptr(&self) -> &FnPtr7<'_, A, B, C, D, E, F, G, R>
Gets the C code pointer that is used to invoke the closure.
sourcepub fn from_parts<U: Any>(
cif: Cif7<A, B, C, D, E, F, G, R>,
callback: CallbackOnce7<U, A, B, C, D, E, F, G, R::RetType>,
userdata: U
) -> Self
pub fn from_parts<U: Any>( cif: Cif7<A, B, C, D, E, F, G, R>, callback: CallbackOnce7<U, A, B, C, D, E, F, G, 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.