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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.source§impl PartialEq for Task
impl PartialEq for Task
impl StructuralPartialEq for Task
Auto Trait Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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