pub struct Builder { /* private fields */ }Available on crate features
alloc and default only.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>>
Available on non-target_os=unknown only.
pub fn spawn<F, T>(self, future: F) -> Result<JoinHandle<T>>
target_os=unknown only.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,
Available on non-target_os=unknown and crate feature unstable only.
pub fn local<F, T>(self, future: F) -> Result<JoinHandle<T>>where
F: Future<Output = T> + 'static,
T: 'static,
target_os=unknown and crate feature unstable only.Spawns a task locally with the configured settings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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