pub struct ManagedTaskScope { /* private fields */ }Expand description
A Module-generation task scope backed by the selected Runtime Driver.
Implementations§
Source§impl ManagedTaskScope
impl ManagedTaskScope
Sourcepub fn spawn_local(
&self,
task: LocalTask,
) -> Result<ManagedTask, ManagedTaskError>
pub fn spawn_local( &self, task: LocalTask, ) -> Result<ManagedTask, ManagedTaskError>
Spawns work owned by this Module Instance generation.
Sourcepub fn task_count(&self) -> usize
pub fn task_count(&self) -> usize
Returns the number of tasks still tracked by this scope.
Sourcepub fn cancellation(&self) -> CancellationToken
pub fn cancellation(&self) -> CancellationToken
Returns the cooperative cancellation token for this generation.
Trait Implementations§
Source§impl Clone for ManagedTaskScope
impl Clone for ManagedTaskScope
Source§fn clone(&self) -> ManagedTaskScope
fn clone(&self) -> ManagedTaskScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ManagedTaskScope
impl !Send for ManagedTaskScope
impl !Sync for ManagedTaskScope
impl !UnwindSafe for ManagedTaskScope
impl Freeze for ManagedTaskScope
impl Unpin for ManagedTaskScope
impl UnsafeUnpin for ManagedTaskScope
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