Struct console_api::tasks::Task
source · pub struct Task {
pub id: Option<Id>,
pub metadata: Option<MetaId>,
pub kind: i32,
pub fields: Vec<Field>,
pub parents: Vec<SpanId>,
pub location: Option<Location>,
}
Expand description
Data recorded when a new task is spawned.
Fields§
§id: Option<Id>
The task’s ID.
This uniquely identifies this task across all currently live tasks.
When the task’s stats change, or when the task completes, it will be
identified by this ID; if the client requires additional information
included in the Task
message, it should store that data and access it
by ID.
metadata: Option<MetaId>
The numeric ID of the task’s Metadata
.
This identifies the Metadata
that describes the tracing
span
corresponding to this task. The metadata for this ID will have been sent
in a prior RegisterMetadata
message.
kind: i32
The category of task this task belongs to.
fields: Vec<Field>
A list of Field
objects attached to this task.
parents: Vec<SpanId>
An ordered list of span IDs corresponding to the tracing
span context
in which this task was spawned.
The first span ID in this list is the immediate parent, followed by that span’s parent, and so on. The final ID is the root span of the current trace.
If this is empty, there were no active spans when the task was spawned.
These IDs may correspond to tracing
spans which are not tasks, if
additional trace data is being collected.
location: Option<Location>
The location in code where the task was spawned.
Implementations§
Trait Implementations§
source§impl Message for Task
impl Message for Task
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request