pub struct ClosureMut4<'a, A, B, C, D, R> { /* private fields */ }Expand description
A mutable, typed closure with the given argument and result types.
Implementations§
Source§impl<'a, A: CType, B: CType, C: CType, D: CType, R: CType> ClosureMut4<'a, A, B, C, D, R>
impl<'a, A: CType, B: CType, C: CType, D: CType, R: CType> ClosureMut4<'a, A, B, C, D, R>
Sourcepub fn new<Callback>(callback: &'a mut Callback) -> Selfwhere
Callback: FnMut(A, B, C, D) -> R + 'a,
pub fn new<Callback>(callback: &'a mut Callback) -> Selfwhere
Callback: FnMut(A, B, C, D) -> R + 'a,
Constructs a typed closure callable from C from a Rust closure.
Source§impl<'a, A, B, C, D, R: CType> ClosureMut4<'a, A, B, C, D, R>
impl<'a, A, B, C, D, R: CType> ClosureMut4<'a, A, B, C, D, R>
Sourcepub fn code_ptr(&self) -> &FnPtr4<'a, A, B, C, D, R>
pub fn code_ptr(&self) -> &FnPtr4<'a, A, B, C, D, R>
Gets the C code pointer that is used to invoke the closure.
Sourcepub fn from_parts<U>(
cif: Cif4<A, B, C, D, R>,
callback: CallbackMut4<U, A, B, C, D, R::RetType>,
userdata: &'a mut U,
) -> Self
pub fn from_parts<U>( cif: Cif4<A, B, C, D, R>, callback: CallbackMut4<U, A, B, C, D, R::RetType>, 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. Note that the return type of the callback must follow the libffi implicit extension rules.
Source§impl<'a, A: Copy, B: Copy, C: Copy, D: Copy, R: CType> ClosureMut4<'a, A, B, C, D, R>
impl<'a, A: Copy, B: Copy, C: Copy, D: Copy, R: CType> ClosureMut4<'a, A, B, C, D, R>
Sourcepub fn new_with_cif<Callback>(
cif: Cif4<A, B, C, D, R>,
callback: &'a mut Callback,
) -> Selfwhere
Callback: FnMut(A, B, C, D) -> R + 'a,
pub fn new_with_cif<Callback>(
cif: Cif4<A, B, C, D, R>,
callback: &'a mut Callback,
) -> Selfwhere
Callback: FnMut(A, B, C, D) -> 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.
Auto Trait Implementations§
impl<'a, A, B, C, D, R> Freeze for ClosureMut4<'a, A, B, C, D, R>
impl<'a, A, B, C, D, R> RefUnwindSafe for ClosureMut4<'a, A, B, C, D, R>
impl<'a, A, B, C, D, R> !Send for ClosureMut4<'a, A, B, C, D, R>
impl<'a, A, B, C, D, R> !Sync for ClosureMut4<'a, A, B, C, D, R>
impl<'a, A, B, C, D, R> Unpin for ClosureMut4<'a, A, B, C, D, R>
impl<'a, A, B, C, D, R> UnsafeUnpin for ClosureMut4<'a, A, B, C, D, R>
impl<'a, A, B, C, D, R> UnwindSafe for ClosureMut4<'a, A, B, C, D, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more