pub struct Builder { /* private fields */ }
Expand description
Task builder that configures the settings of a new task.
Implementations
sourceimpl 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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more