pub struct ObservationSnapshot { /* private fields */ }Expand description
Immutable shared view of retained observations, ordered oldest to newest.
Implementations§
Source§impl ObservationSnapshot
impl ObservationSnapshot
Sourcepub fn iter(&self) -> impl DoubleEndedIterator<Item = &ObservationEvent>
pub fn iter(&self) -> impl DoubleEndedIterator<Item = &ObservationEvent>
Iterates from the oldest observation to the newest without cloning it.
Sourcepub fn recent(&self, limit: usize) -> impl Iterator<Item = &ObservationEvent>
pub fn recent(&self, limit: usize) -> impl Iterator<Item = &ObservationEvent>
Iterates over at most the newest limit observations in chronological order.
Trait Implementations§
Source§impl Clone for ObservationSnapshot
impl Clone for ObservationSnapshot
Source§fn clone(&self) -> ObservationSnapshot
fn clone(&self) -> ObservationSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObservationSnapshot
impl Debug for ObservationSnapshot
Source§impl Default for ObservationSnapshot
impl Default for ObservationSnapshot
Source§fn default() -> ObservationSnapshot
fn default() -> ObservationSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ObservationSnapshot
impl RefUnwindSafe for ObservationSnapshot
impl Send for ObservationSnapshot
impl Sync for ObservationSnapshot
impl Unpin for ObservationSnapshot
impl UnsafeUnpin for ObservationSnapshot
impl UnwindSafe for ObservationSnapshot
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