pub struct SpawnMeta(/* private fields */);Expand description
Metadata of a spawned task, reported to the console.
None for a task that is not reported at all. The disabled variant of this
is zero-sized, so nothing here may be load-bearing outside of the console.
Implementations§
Source§impl SpawnMeta
impl SpawnMeta
Sourcepub fn named(self, name: &'static str) -> Self
pub fn named(self, name: &'static str) -> Self
Name the task, which the console displays in a column of its own.
This is worth doing for the tasks a user did not spawn themselves, since the location of those points into compio rather than into their code.
Sourcepub fn untracked() -> Self
pub fn untracked() -> Self
Do not report the task to the console at all.
This is for tasks that only wrap work reported by something else, like the future waiting for a blocking closure: reporting both would count the same work twice, and hide the interesting one behind a wrapper that is idle the whole time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpawnMeta
impl RefUnwindSafe for SpawnMeta
impl Send for SpawnMeta
impl Sync for SpawnMeta
impl Unpin for SpawnMeta
impl UnsafeUnpin for SpawnMeta
impl UnwindSafe for SpawnMeta
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