pub struct FixedSizeEventBuffer<const N: usize> { /* private fields */ }
Expand description
A fixed-size event buffer.
Implementations§
Source§impl<const N: usize> FixedSizeEventBuffer<N>
impl<const N: usize> FixedSizeEventBuffer<N>
Sourcepub fn has_event_type(&self, event_type: EventType) -> bool
pub fn has_event_type(&self, event_type: EventType) -> bool
Returns true
if this event buffer contains one or more events of the given event type.
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears the event buffer, removing all events and resetting the seen event types.
Sourcepub fn try_push(&mut self, event: Event) -> Option<Event>
pub fn try_push(&mut self, event: Event) -> Option<Event>
Attempts to append an event to the back of the event buffer.
If the event buffer is full, Some
is returned with the original event.
Trait Implementations§
Source§impl<const N: usize> Clone for FixedSizeEventBuffer<N>
impl<const N: usize> Clone for FixedSizeEventBuffer<N>
Source§fn clone(&self) -> FixedSizeEventBuffer<N>
fn clone(&self) -> FixedSizeEventBuffer<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<const N: usize> Debug for FixedSizeEventBuffer<N>
impl<const N: usize> Debug for FixedSizeEventBuffer<N>
Source§impl<const N: usize> Default for FixedSizeEventBuffer<N>
impl<const N: usize> Default for FixedSizeEventBuffer<N>
Source§impl<const N: usize> Dispatchable for FixedSizeEventBuffer<N>
impl<const N: usize> Dispatchable for FixedSizeEventBuffer<N>
Source§fn item_count(&self) -> usize
fn item_count(&self) -> usize
Returns the number of items in the dispatchable value. Read more
Source§impl<'a, const N: usize> IntoIterator for &'a FixedSizeEventBuffer<N>
impl<'a, const N: usize> IntoIterator for &'a FixedSizeEventBuffer<N>
Source§impl<'a, const N: usize> IntoIterator for &'a mut FixedSizeEventBuffer<N>
impl<'a, const N: usize> IntoIterator for &'a mut FixedSizeEventBuffer<N>
Source§impl<const N: usize> IntoIterator for FixedSizeEventBuffer<N>
impl<const N: usize> IntoIterator for FixedSizeEventBuffer<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for FixedSizeEventBuffer<N>
impl<const N: usize> !RefUnwindSafe for FixedSizeEventBuffer<N>
impl<const N: usize> Send for FixedSizeEventBuffer<N>
impl<const N: usize> Sync for FixedSizeEventBuffer<N>
impl<const N: usize> Unpin for FixedSizeEventBuffer<N>
impl<const N: usize> !UnwindSafe for FixedSizeEventBuffer<N>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Wrap the input message
T
in a tonic::Request
Source§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked
wrapper. Read more