Struct console_api::resources::Resource
source · [−]pub struct Resource {
pub id: Option<Id>,
pub metadata: Option<MetaId>,
pub concrete_type: String,
pub kind: Option<Kind>,
pub location: Option<Location>,
pub parent_resource_id: Option<Id>,
pub is_internal: bool,
}Expand description
Static data recorded when a new resource is created.
Fields
id: Option<Id>The resources’s ID.
This uniquely identifies this resource across all currently live resources. This is also the primary way any operations on a resource are associated with it
metadata: Option<MetaId>The numeric ID of the resources’s Metadata.
concrete_type: StringThe resources’s concrete rust type.
kind: Option<Kind>The kind of resource (e.g timer, mutex)
location: Option<Location>The location in code where the resource was created.
parent_resource_id: Option<Id>The ID of the parent resource.
is_internal: boolIs the resource an internal component of another resource?
For example, a tokio::time::Interval resource might contain a
tokio::time::Sleep resource internally.
Trait Implementations
Returns the encoded length of the message without a length delimiter.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self. Read more
Decodes a length-delimited instance of the message from buffer, and
merges it into self. Read more
Auto Trait Implementations
impl RefUnwindSafe for Resource
impl UnwindSafe for Resource
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more