Struct console_api::resources::ResourceUpdate
source · [−]pub struct ResourceUpdate {
pub new_resources: Vec<Resource>,
pub stats_update: HashMap<u64, Stats>,
pub new_poll_ops: Vec<PollOp>,
pub dropped_events: u64,
}
Expand description
A resource state update.
Each ResourceUpdate
contains any resource data that has changed since the last
update. This includes:
- any new resources that were created since the last update
- the current stats for any resource whose stats changed since the last update
- any new poll ops that have been invoked on a resource
Fields
new_resources: Vec<Resource>
A list of new resources that were created since the last ResourceUpdate
was
sent.
stats_update: HashMap<u64, Stats>
Any resource stats that have changed since the last update.
new_poll_ops: Vec<PollOp>
A list of all new poll ops that have been invoked on resources since the last update.
dropped_events: u64
A count of how many resource events (e.g. polls, creation, etc) were not recorded because the application’s event buffer was at capacity.
If everything is working normally, this should be 0. If it is greater than 0, that may indicate that some data is missing from this update, and it may be necessary to increase the number of events buffered by the application to ensure that data loss is avoided.
If the application’s instrumentation ensures reliable delivery of events, this will always be 0.
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ResourceUpdate
impl Send for ResourceUpdate
impl Sync for ResourceUpdate
impl Unpin for ResourceUpdate
impl UnwindSafe for ResourceUpdate
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