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