pub struct DedupeLogNode<T: Unit + PartialEq> { /* private fields */ }Expand description
A Inspect node that holds an ordered, bounded list of log entries, with the ability to dedupe consecutive logs.
Implementations§
Source§impl<T: Unit + PartialEq> DedupeLogNode<T>
impl<T: Unit + PartialEq> DedupeLogNode<T>
pub fn new(node: Node, capacity: usize) -> Self
Sourcepub fn insert(&mut self, log: T)
pub fn insert(&mut self, log: T)
Insert |log| into DedupeLogNode.
If |log| is equivalent to the last inserted log, the last inserted log entry’s count is incremented and last seen time is updated. If the new log is not equivalent to the last inserted log, a new log entry is inserted, and the oldest log entry is removed if capacity is exceeded.
Auto Trait Implementations§
impl<T> Freeze for DedupeLogNode<T>where
T: Freeze,
impl<T> !RefUnwindSafe for DedupeLogNode<T>
impl<T> Send for DedupeLogNode<T>
impl<T> Sync for DedupeLogNode<T>
impl<T> Unpin for DedupeLogNode<T>
impl<T> !UnwindSafe for DedupeLogNode<T>
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more