pub struct WebExecutor;
Available on crate feature
web
only.Expand description
Web-based executor implementation for WASM targets.
This executor uses wasm-bindgen-futures::spawn_local
to execute futures
in web environments. Both Send
and non-Send
futures are handled the same
way since web environments are single-threaded.
§Panic Handling
Unlike other executors, the web executor cannot catch panics due to WASM limitations. If a spawned task panics, the entire WASM module will terminate. This is a fundamental limitation of the WASM environment and cannot be worked around.
Implementations§
Source§impl WebExecutor
impl WebExecutor
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new WebExecutor
.
Trait Implementations§
Source§impl Clone for WebExecutor
impl Clone for WebExecutor
Source§fn clone(&self) -> WebExecutor
fn clone(&self) -> WebExecutor
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 moreSource§impl Debug for WebExecutor
impl Debug for WebExecutor
Source§impl Default for WebExecutor
impl Default for WebExecutor
Source§impl Executor for WebExecutor
impl Executor for WebExecutor
Source§impl LocalExecutor for WebExecutor
impl LocalExecutor for WebExecutor
impl Copy for WebExecutor
Auto Trait Implementations§
impl Freeze for WebExecutor
impl RefUnwindSafe for WebExecutor
impl Send for WebExecutor
impl Sync for WebExecutor
impl Unpin for WebExecutor
impl UnwindSafe for WebExecutor
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