Struct console_api::async_ops::AsyncOp
source · pub struct AsyncOp {
pub id: Option<Id>,
pub metadata: Option<MetaId>,
pub source: String,
pub parent_async_op_id: Option<Id>,
pub resource_id: Option<Id>,
}
Expand description
An async operation.
An async operation is an operation that is associated with a resource This could, for example, be a read or write on a TCP stream, or a receive operation on a channel.
Fields§
§id: Option<Id>
The async op’s ID.
This uniquely identifies this op across all currently live ones.
metadata: Option<MetaId>
The numeric ID of the op’s Metadata
.
This identifies the Metadata
that describes the tracing
span
corresponding to this async op. The metadata for this ID will have been sent
in a prior RegisterMetadata
message.
source: String
The source of this async operation. Most commonly this should be the name of the method where the instantiation of this op has happened.
parent_async_op_id: Option<Id>
The ID of the parent async op.
This field is only set if this async op was created while inside of another
async op. For example, tokio::sync
’s Mutex::lock
internally calls
Semaphore::acquire
.
This field can be empty; if it is empty, this async op is not a child of another async op.
resource_id: Option<Id>
The resources’s ID.
Trait Implementations§
source§impl Message for AsyncOp
impl Message for AsyncOp
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 AsyncOp
Auto Trait Implementations§
impl Freeze for AsyncOp
impl RefUnwindSafe for AsyncOp
impl Send for AsyncOp
impl Sync for AsyncOp
impl Unpin for AsyncOp
impl UnwindSafe for AsyncOp
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