pub struct ClosureMut7<'a, A, B, C, D, E, F, G, 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, E: CType, F: CType, G: CType, R: CType> ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A: CType, B: CType, C: CType, D: CType, E: CType, F: CType, G: CType, R: CType> ClosureMut7<'a, A, B, C, D, E, F, G, R>
Sourcepub fn new<Callback>(callback: &'a mut Callback) -> Selfwhere
Callback: FnMut(A, B, C, D, E, F, G) -> R + 'a,
pub fn new<Callback>(callback: &'a mut Callback) -> Selfwhere
Callback: FnMut(A, B, C, D, E, F, G) -> R + 'a,
Constructs a typed closure callable from C from a Rust closure.
Source§impl<'a, A, B, C, D, E, F, G, R: CType> ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A, B, C, D, E, F, G, R: CType> ClosureMut7<'a, A, B, C, D, E, F, G, R>
Sourcepub fn code_ptr(&self) -> &FnPtr7<'a, A, B, C, D, E, F, G, R>
pub fn code_ptr(&self) -> &FnPtr7<'a, 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>(
cif: Cif7<A, B, C, D, E, F, G, R>,
callback: CallbackMut7<U, A, B, C, D, E, F, G, R::RetType>,
userdata: &'a mut U,
) -> Self
pub fn from_parts<U>( cif: Cif7<A, B, C, D, E, F, G, R>, callback: CallbackMut7<U, A, B, C, D, E, F, G, 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, E: Copy, F: Copy, G: Copy, R: CType> ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A: Copy, B: Copy, C: Copy, D: Copy, E: Copy, F: Copy, G: Copy, R: CType> ClosureMut7<'a, 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: &'a mut Callback,
) -> Selfwhere
Callback: FnMut(A, B, C, D, E, F, G) -> R + 'a,
pub fn new_with_cif<Callback>(
cif: Cif7<A, B, C, D, E, F, G, R>,
callback: &'a mut Callback,
) -> Selfwhere
Callback: FnMut(A, B, C, D, E, F, G) -> 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, E, F, G, R> Freeze for ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A, B, C, D, E, F, G, R> RefUnwindSafe for ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A, B, C, D, E, F, G, R> !Send for ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A, B, C, D, E, F, G, R> !Sync for ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A, B, C, D, E, F, G, R> Unpin for ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A, B, C, D, E, F, G, R> UnsafeUnpin for ClosureMut7<'a, A, B, C, D, E, F, G, R>
impl<'a, A, B, C, D, E, F, G, R> UnwindSafe for ClosureMut7<'a, A, B, C, D, E, F, G, 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