//! Snapshots of runtime state. //! //! See [Handle::dump][crate::runtime::Handle::dump].
usecrate::task::Id; use std::fmt;
/// A snapshot of a runtime's state. /// /// See [Handle::dump][crate::runtime::Handle::dump]. #[derive(Debug)] pubstruct Dump {
tasks: Tasks,
}
/// Snapshots of tasks. /// /// See [Handle::dump][crate::runtime::Handle::dump]. #[derive(Debug)] pubstruct Tasks {
tasks: Vec<Task>,
}
/// A snapshot of a task. /// /// See [Handle::dump][crate::runtime::Handle::dump]. #[derive(Debug)] pubstruct Task {
id: Id,
trace: Trace,
}
/// An execution trace of a task's last poll. /// /// See [Handle::dump][crate::runtime::Handle::dump]. #[derive(Debug)] pubstruct Trace {
inner: super::task::trace::Trace,
}
/// Returns a [task ID] that uniquely identifies this task relative to other /// tasks spawned at the time of the dump. /// /// **Note**: This is an [unstable API][unstable]. The public API of this type /// may break in 1.x releases. See [the documentation on unstable /// features][unstable] for details. /// /// [task ID]: crate::task::Id /// [unstable]: crate#unstable-features #[cfg(tokio_unstable)] #[cfg_attr(docsrs, doc(cfg(tokio_unstable)))] pubfn id(&self) -> Id { self.id
}
/// A trace of this task's state. pubfn trace(&self) -> &Trace {
&self.trace
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.