Struct web_thread::Scope
source · pub struct Scope<'scope, 'env: 'scope> { /* private fields */ }
Expand description
See std::thread::Scope
.
Implementations§
Trait Implementations§
source§impl<'scope> ScopeExt<'scope> for Scope<'scope, '_>
Available on Web
only.
impl<'scope> ScopeExt<'scope> for Scope<'scope, '_>
Available on
Web
only.source§fn spawn_async<F1, F2, T>(&'scope self, f: F1) -> ScopedJoinHandle<'scope, T>
fn spawn_async<F1, F2, T>(&'scope self, f: F1) -> ScopedJoinHandle<'scope, T>
Async version of
Scope::spawn()
. Read moresource§fn spawn_with_message<F1, F2, T, M>(
&'scope self,
f: F1,
message: M,
) -> ScopedJoinHandle<'scope, T>where
F1: 'scope + FnOnce(M) -> F2 + Send,
F2: 'scope + Future<Output = T>,
T: 'scope + Send,
M: 'scope + MessageSend,
fn spawn_with_message<F1, F2, T, M>(
&'scope self,
f: F1,
message: M,
) -> ScopedJoinHandle<'scope, T>where
F1: 'scope + FnOnce(M) -> F2 + Send,
F2: 'scope + Future<Output = T>,
T: 'scope + Send,
M: 'scope + MessageSend,
Available on crate feature
message
only.Auto Trait Implementations§
impl<'scope, 'env> Freeze for Scope<'scope, 'env>
impl<'scope, 'env> RefUnwindSafe for Scope<'scope, 'env>
impl<'scope, 'env> Send for Scope<'scope, 'env>
impl<'scope, 'env> Sync for Scope<'scope, 'env>
impl<'scope, 'env> Unpin for Scope<'scope, 'env>
impl<'scope, 'env> !UnwindSafe for Scope<'scope, 'env>
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