pub struct Events { /* private fields */ }
Expand description
Descending sorted collection of events
Implementations§
Source§impl Events
impl Events
Sourcepub fn insert(&mut self, event: Event) -> bool
pub fn insert(&mut self, event: Event) -> bool
Insert Event
If the set did not previously contain an equal value, true
is returned.
If the collection is full, the older events will be discarded.
Use Events::force_insert
to always make sure the event is inserted.
Sourcepub fn force_insert(&mut self, event: Event) -> bool
pub fn force_insert(&mut self, event: Event) -> bool
Force insert Event
Use Events::insert
to respect the max collection capacity (if any).
If the collection capacity is full, this method will increase it.
Sourcepub fn extend<I>(&mut self, events: I)where
I: IntoIterator<Item = Event>,
pub fn extend<I>(&mut self, events: I)where
I: IntoIterator<Item = Event>,
Insert events
Sourcepub fn first_owned(self) -> Option<Event>
pub fn first_owned(self) -> Option<Event>
Get first Event
(descending order)
Sourcepub fn last_owned(self) -> Option<Event>
pub fn last_owned(self) -> Option<Event>
Get last Event
(descending order)
Trait Implementations§
Source§impl FromIterator<Event> for Events
impl FromIterator<Event> for Events
Source§impl IntoIterator for Events
impl IntoIterator for Events
impl Eq for Events
Auto Trait Implementations§
impl Freeze for Events
impl RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl UnwindSafe for Events
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