pub struct Bindgen;
Available on crate feature
bindgen
and WebAssembly only.Expand description
A type that implements Spawn
, LocalSpawn
, SpawnHandle
and LocalSpawnHandle
.
Spawns on the wasm-bingen-futures executor. The executor is global, eg. not self contained
and zero sized.
Implementations§
Trait Implementations§
Source§impl LocalSpawn for Bindgen
impl LocalSpawn for Bindgen
Source§fn spawn_local_obj(
&self,
future: LocalFutureObj<'static, ()>,
) -> Result<(), SpawnError>
fn spawn_local_obj( &self, future: LocalFutureObj<'static, ()>, ) -> Result<(), SpawnError>
Spawns a future that will be run to completion. Read more
Source§fn status_local(&self) -> Result<(), SpawnError>
fn status_local(&self) -> Result<(), SpawnError>
Determines whether the executor is able to spawn new tasks. Read more
Source§impl<Out: 'static> LocalSpawnHandle<Out> for Bindgen
impl<Out: 'static> LocalSpawnHandle<Out> for Bindgen
Source§fn spawn_handle_local_obj(
&self,
future: LocalFutureObj<'static, Out>,
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_local_obj( &self, future: LocalFutureObj<'static, Out>, ) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a
JoinHandle
that can be awaited for the output of the future.Source§impl<Out: 'static + Send> SpawnHandle<Out> for Bindgen
impl<Out: 'static + Send> SpawnHandle<Out> for Bindgen
Source§fn spawn_handle_obj(
&self,
future: FutureObj<'static, Out>,
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_obj( &self, future: FutureObj<'static, Out>, ) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a
JoinHandle
that can be awaited for the output of the future.Source§impl YieldNow for Bindgen
impl YieldNow for Bindgen
Source§fn yield_now(&self) -> YieldNowFut ⓘ
fn yield_now(&self) -> YieldNowFut ⓘ
Await this future in order to yield to the executor.
impl Copy for Bindgen
Auto Trait Implementations§
impl Freeze for Bindgen
impl RefUnwindSafe for Bindgen
impl Send for Bindgen
impl Sync for Bindgen
impl Unpin for Bindgen
impl UnwindSafe for Bindgen
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Sp> LocalSpawnExt for Spwhere
Sp: LocalSpawn + ?Sized,
impl<Sp> LocalSpawnExt for Spwhere
Sp: LocalSpawn + ?Sized,
Source§fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>
fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>
Spawns a task that polls the given future with output
()
to
completion. Read moreSource§fn spawn_local_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where
Fut: Future + 'static,
fn spawn_local_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where
Fut: Future + 'static,
Spawns a task that polls the given future to completion and returns a
future that resolves to the spawned future’s output. Read more
Source§impl<T, Out> LocalSpawnHandleExt<Out> for Twhere
T: LocalSpawnHandle<Out> + ?Sized,
Out: 'static,
impl<T, Out> LocalSpawnHandleExt<Out> for Twhere
T: LocalSpawnHandle<Out> + ?Sized,
Out: 'static,
Source§fn spawn_handle_local(
&self,
future: impl Future<Output = Out> + 'static,
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_local( &self, future: impl Future<Output = Out> + 'static, ) -> Result<JoinHandle<Out>, SpawnError>
Convenience trait for passing in a generic future to
LocalSpawnHandle
. Much akin to LocalSpawn
and LocalSpawnExt
in the
futures library.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<Sp> SpawnExt for Sp
impl<Sp> SpawnExt for Sp
Source§fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
Spawns a task that polls the given future with output
()
to
completion. Read moreSource§fn spawn_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
fn spawn_with_handle<Fut>( &self, future: Fut, ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
Spawns a task that polls the given future to completion and returns a
future that resolves to the spawned future’s output. Read more
Source§impl<T, Out> SpawnHandleExt<Out> for T
impl<T, Out> SpawnHandleExt<Out> for T
Source§fn spawn_handle(
&self,
future: impl Future<Output = Out> + Send + 'static,
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle( &self, future: impl Future<Output = Out> + Send + 'static, ) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a JoinHandle that can be awaited for the output of the future.