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) -> SpawnMeta
pub fn named(self, name: &'static str) -> SpawnMeta
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() -> SpawnMeta
pub fn untracked() -> SpawnMeta
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more