Trait async_ffi::ContextExt

source ·
pub trait ContextExt {
    // Required method
    fn with_ffi_context<T, F: FnOnce(&mut FfiContext<'_>) -> T>(
        &mut self,
        closure: F
    ) -> T;
}
Expand description

Helper trait to provide convenience methods for converting a std::task::Context to FfiContext

Required Methods§

source

fn with_ffi_context<T, F: FnOnce(&mut FfiContext<'_>) -> T>( &mut self, closure: F ) -> T

Runs a closure with the std::task::Context as a FfiContext.

Implementations on Foreign Types§

source§

impl<'a> ContextExt for Context<'a>

source§

fn with_ffi_context<T, F: FnOnce(&mut FfiContext<'_>) -> T>( &mut self, closure: F ) -> T

Implementors§