pub struct EventCache<T> { /* private fields */ }
Implementations§
Source§impl<T: Debug> EventCache<T>
impl<T: Debug> EventCache<T>
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
To be called in the case that the cache is invalidated due to the pattern changing in some way.
Sourcepub fn update(&mut self, new_span: Span, pattern: impl Pattern<Value = T>)
pub fn update(&mut self, new_span: Span, pattern: impl Pattern<Value = T>)
Efficiently update the cache to contain all events within the given new_span
.
This method will only query the difference between self.span
and new_span
to reduce the load on calls to query
.
Returns whether or not the cache was mutated in some way.
Trait Implementations§
Source§impl<T: Debug> Debug for EventCache<T>
impl<T: Debug> Debug for EventCache<T>
Auto Trait Implementations§
impl<T> Freeze for EventCache<T>
impl<T> RefUnwindSafe for EventCache<T>where
T: RefUnwindSafe,
impl<T> Send for EventCache<T>where
T: Send,
impl<T> Sync for EventCache<T>where
T: Sync,
impl<T> Unpin for EventCache<T>where
T: Unpin,
impl<T> UnwindSafe for EventCache<T>where
T: 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