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§
source§impl Clone for ResourceUpdate
impl Clone for ResourceUpdate
source§fn clone(&self) -> ResourceUpdate
fn clone(&self) -> ResourceUpdate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ResourceUpdate
impl Debug for ResourceUpdate
source§impl Default for ResourceUpdate
impl Default for ResourceUpdate
source§impl Message for ResourceUpdate
impl Message for ResourceUpdate
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
.source§impl PartialEq for ResourceUpdate
impl PartialEq for ResourceUpdate
source§fn eq(&self, other: &ResourceUpdate) -> bool
fn eq(&self, other: &ResourceUpdate) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ResourceUpdate
Auto Trait Implementations§
impl Freeze for ResourceUpdate
impl RefUnwindSafe for ResourceUpdate
impl Send for ResourceUpdate
impl Sync for ResourceUpdate
impl Unpin for ResourceUpdate
impl UnwindSafe for ResourceUpdate
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