Struct tokio_task_tracker::Builder
source · pub struct Builder { /* private fields */ }
Expand description
Builder is used to create a TaskSpawner and TaskWaiter.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_cancellation_token(self, token: CancellationToken) -> Self
pub fn set_cancellation_token(self, token: CancellationToken) -> Self
Use an existing CancellationToken for the returned TaskWaiter and TaskSpawner. If the given token is cancelled, all associated TaskTrackers will be cancelled as well.
sourcepub fn build(self) -> (TaskSpawner, TaskWaiter)
pub fn build(self) -> (TaskSpawner, TaskWaiter)
Create a new TaskSpawner and TaskWaiter.
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§
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