pub struct EventBatch<M> { /* private fields */ }Expand description
Event batch for efficient processing of multiple events
Implementations§
Source§impl<M> EventBatch<M>
impl<M> EventBatch<M>
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new event batch with capacity
Sourcepub fn push(&mut self, event: OptimizedEvent<M>)
pub fn push(&mut self, event: OptimizedEvent<M>)
Add an event to the batch
Sourcepub fn iter(&self) -> Iter<'_, OptimizedEvent<M>>
pub fn iter(&self) -> Iter<'_, OptimizedEvent<M>>
Iterate over events in the batch
Sourcepub fn drain(&mut self) -> Drain<'_, [OptimizedEvent<M>; 8]>
pub fn drain(&mut self) -> Drain<'_, [OptimizedEvent<M>; 8]>
Drain all events from the batch
Trait Implementations§
Source§impl<M: Clone> Clone for EventBatch<M>
impl<M: Clone> Clone for EventBatch<M>
Source§fn clone(&self) -> EventBatch<M>
fn clone(&self) -> EventBatch<M>
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<M: Debug> Debug for EventBatch<M>
impl<M: Debug> Debug for EventBatch<M>
Source§impl<M> Default for EventBatch<M>
impl<M> Default for EventBatch<M>
Source§impl<M> IntoIterator for EventBatch<M>
impl<M> IntoIterator for EventBatch<M>
Auto Trait Implementations§
impl<M> Freeze for EventBatch<M>where
M: Freeze,
impl<M> RefUnwindSafe for EventBatch<M>where
M: RefUnwindSafe,
impl<M> Send for EventBatch<M>where
M: Send,
impl<M> Sync for EventBatch<M>where
M: Sync,
impl<M> Unpin for EventBatch<M>where
M: Unpin,
impl<M> UnsafeUnpin for EventBatch<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for EventBatch<M>where
M: RefUnwindSafe + UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter