Struct yew::platform::LocalHandle
source · pub struct LocalHandle { /* private fields */ }
Expand description
A Local Runtime Handle.
This type can be used to acquire a runtime handle to spawn local tasks.
Implementations§
source§impl LocalHandle
impl LocalHandle
sourcepub fn current() -> LocalHandle
pub fn current() -> LocalHandle
sourcepub fn try_current() -> Option<LocalHandle>
pub fn try_current() -> Option<LocalHandle>
Creates a Handle to current Runtime worker.
This methods will return None
if called from outside the Runtime.
sourcepub fn spawn_local<F>(&self, f: F)where
F: 'static + Future<Output = ()>,
pub fn spawn_local<F>(&self, f: F)where
F: 'static + Future<Output = ()>,
Spawns a Future with current Runtime worker.
Trait Implementations§
source§impl Clone for LocalHandle
impl Clone for LocalHandle
source§fn clone(&self) -> LocalHandle
fn clone(&self) -> LocalHandle
Returns a copy 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 more