pub struct DiagnosticObserver { /* private fields */ }Expand description
The receiving side of one independently bounded diagnostics queue.
Implementations§
Source§impl DiagnosticObserver
impl DiagnosticObserver
Sourcepub async fn recv(&mut self) -> Option<DiagnosticRecord>
pub async fn recv(&mut self) -> Option<DiagnosticRecord>
Waits asynchronously for the oldest pending record.
The observer side may await; Kernel producers always use non-blocking enqueue and never execute observer-owned code.
Sourcepub fn try_recv(&self) -> Option<DiagnosticRecord>
pub fn try_recv(&self) -> Option<DiagnosticRecord>
Removes and returns the oldest pending record without waiting.
Sourcepub fn try_next(&self) -> Option<DiagnosticRecord>
pub fn try_next(&self) -> Option<DiagnosticRecord>
Alias for Self::try_recv.
Sourcepub fn dropped_count(&self) -> u64
pub fn dropped_count(&self) -> u64
Returns the number of records dropped because this queue was full.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Returns the number of records currently buffered.
Sourcepub fn filter(&self) -> DiagnosticFilter
pub fn filter(&self) -> DiagnosticFilter
Returns this observer’s source filter.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DiagnosticObserver
impl !Send for DiagnosticObserver
impl !Sync for DiagnosticObserver
impl !UnwindSafe for DiagnosticObserver
impl Freeze for DiagnosticObserver
impl Unpin for DiagnosticObserver
impl UnsafeUnpin for DiagnosticObserver
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
Mutably borrows from an owned value. Read more