pub struct Builder { /* private fields */ }
Expand description
Task builder that configures the settings of a new task.
Implementations§
source§impl Builder
impl Builder
sourcepub fn spawn<F, T>(self, future: F) -> Result<JoinHandle<T>>where
F: Future<Output = T> + Send + 'static,
T: Send + 'static,
pub fn spawn<F, T>(self, future: F) -> Result<JoinHandle<T>>where
F: Future<Output = T> + Send + 'static,
T: Send + 'static,
Spawns a task with the configured settings.
sourcepub fn local<F, T>(self, future: F) -> Result<JoinHandle<T>>where
F: Future<Output = T> + 'static,
T: 'static,
pub fn local<F, T>(self, future: F) -> Result<JoinHandle<T>>where
F: Future<Output = T> + 'static,
T: 'static,
Spawns a task locally with the configured settings.