pub struct Handle { /* private fields */ }
Expand description
A handle to a Runtime
that allows spawning additional futures from other threads.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn spawn<F>(&self, future: F) -> Result<&Self, SpawnError>
pub fn spawn<F>(&self, future: F) -> Result<&Self, SpawnError>
Spawn a future onto a runtime in the pool.
This spawns the given future onto a single thread runtime’s executor. That thread is then responsible for polling the future until it completes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handle
impl !RefUnwindSafe for Handle
impl Send for Handle
impl !Sync for Handle
impl Unpin for Handle
impl !UnwindSafe for Handle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)