Struct TaskMeta
pub struct TaskMeta<'a> { /* private fields */ }
Available on
tokio_unstable and crate feature rt only.Task metadata supplied to user-provided hooks for task events.
Note: This is an unstable API. The public API of this type may break in 1.x releases. See the documentation on unstable features for details.
Implementations
impl<'a> TaskMeta<'a>
pub fn spawned_at(&self) -> &'static Location<'static>
Return the source code location where the task was spawned.
Auto Trait Implementations
impl<'a> Freeze for TaskMeta<'a>
impl<'a> RefUnwindSafe for TaskMeta<'a>
impl<'a> Send for TaskMeta<'a>
impl<'a> Sync for TaskMeta<'a>
impl<'a> Unpin for TaskMeta<'a>
impl<'a> UnsafeUnpin for TaskMeta<'a>
impl<'a> UnwindSafe for TaskMeta<'a>
Blanket Implementations
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Instrument for T
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> WithSubscriber for T
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/runtime/struct.TaskMeta.html