pub trait JoinSetExt<T> {
// Required method
fn spawn_named<Fut, Name, NameClosure>(
&mut self,
nc: NameClosure,
future: Fut,
) -> AbortHandle
where Name: AsRef<str>,
NameClosure: FnOnce() -> Name,
Fut: Future<Output = T> + Send + 'static,
T: Send + 'static;
}Available on crate feature
async only.Expand description
Extension methods for tokio::task::JoinSet.
See the module docs for more information.
Required Methods§
Sourcefn spawn_named<Fut, Name, NameClosure>(
&mut self,
nc: NameClosure,
future: Fut,
) -> AbortHandle
fn spawn_named<Fut, Name, NameClosure>( &mut self, nc: NameClosure, future: Fut, ) -> AbortHandle
Spawns a new asynchronous task with a name.
See tokio::task::spawn and the module docs for more
information.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".