pub struct LevelWorkerHandle { /* private fields */ }Expand description
A spawn handle for the local runtime
Implementations§
Source§impl LevelWorkerHandle
impl LevelWorkerHandle
Sourcepub fn spawn_local<F>(&self, future: F) -> JoinHandle<F::Output>
pub fn spawn_local<F>(&self, future: F) -> JoinHandle<F::Output>
Spawn the future on this thread’s local runtime
Sourcepub fn block_on<F>(&self, future: F) -> F::Outputwhere
F: Future,
pub fn block_on<F>(&self, future: F) -> F::Outputwhere
F: Future,
Run the future on this thread’s local runtime
Sourcepub fn concurrency(&self) -> usize
pub fn concurrency(&self) -> usize
How many tasks are currently spawned on this level worker?
Trait Implementations§
Source§impl Clone for LevelWorkerHandle
impl Clone for LevelWorkerHandle
Source§fn clone(&self) -> LevelWorkerHandle
fn clone(&self) -> LevelWorkerHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LevelWorkerHandle
impl RefUnwindSafe for LevelWorkerHandle
impl Send for LevelWorkerHandle
impl Sync for LevelWorkerHandle
impl Unpin for LevelWorkerHandle
impl UnsafeUnpin for LevelWorkerHandle
impl UnwindSafe for LevelWorkerHandle
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