pub struct Asyncify<F, D> { /* private fields */ }
Expand description
Spawn a blocking function in the thread pool.
Implementations§
Trait Implementations§
source§impl<D: Send + 'static, F: FnOnce() -> BufResult<usize, D> + Send + Sync + 'static> OpCode for Asyncify<F, D>
impl<D: Send + 'static, F: FnOnce() -> BufResult<usize, D> + Send + Sync + 'static> OpCode for Asyncify<F, D>
source§impl<D: Send + 'static, F: FnOnce() -> BufResult<usize, D> + Send + Sync + 'static> OpCode for Asyncify<F, D>
impl<D: Send + 'static, F: FnOnce() -> BufResult<usize, D> + Send + Sync + 'static> OpCode for Asyncify<F, D>
source§fn create_entry(self: Pin<&mut Self>) -> OpEntry
fn create_entry(self: Pin<&mut Self>) -> OpEntry
Create submission entry.
source§fn call_blocking(self: Pin<&mut Self>) -> Result<usize>
fn call_blocking(self: Pin<&mut Self>) -> Result<usize>
Call the operation in a blocking way. This method will only be called if
[
create_entry
] returns OpEntry::Blocking
.Auto Trait Implementations§
impl<F, D> Freeze for Asyncify<F, D>
impl<F, D> RefUnwindSafe for Asyncify<F, D>where
F: RefUnwindSafe,
D: RefUnwindSafe,
impl<F, D> Send for Asyncify<F, D>
impl<F, D> Sync for Asyncify<F, D>
impl<F, D> !Unpin for Asyncify<F, D>
impl<F, D> UnwindSafe for Asyncify<F, D>where
F: UnwindSafe,
D: UnwindSafe,
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