pub struct MsgTree<K> { /* private fields */ }Expand description
Aggregates output lines into a tree structure for deduplication.
Implementations§
Source§impl<K: Eq + Hash + Clone> MsgTree<K>
impl<K: Eq + Hash + Clone> MsgTree<K>
Sourcepub fn new(mode: MsgTreeMode) -> Self
pub fn new(mode: MsgTreeMode) -> Self
Create a new MsgTree with the given mode.
Sourcepub fn get(&self, key: &K) -> Option<MsgTreeElem<'_, K>>
pub fn get(&self, key: &K) -> Option<MsgTreeElem<'_, K>>
Return the message for key if key is in the MsgTree.
Sourcepub fn walk<'a>(
&'a mut self,
match_filter: Option<&'a dyn Fn(&K) -> bool>,
) -> WalkIter<'a, K> ⓘ
pub fn walk<'a>( &'a mut self, match_filter: Option<&'a dyn Fn(&K) -> bool>, ) -> WalkIter<'a, K> ⓘ
Walk the tree and return an iterator over (message, keys) tuples.
Sourcepub fn walk_trace<'a>(
&'a mut self,
match_filter: Option<&'a dyn Fn(&K) -> bool>,
) -> WalkTraceIter<'a, K> ⓘ
pub fn walk_trace<'a>( &'a mut self, match_filter: Option<&'a dyn Fn(&K) -> bool>, ) -> WalkTraceIter<'a, K> ⓘ
Walk the tree in trace mode. Only valid in Trace mode.
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for MsgTree<K>
impl<K> RefUnwindSafe for MsgTree<K>
impl<K> Send for MsgTree<K>
impl<K> Sync for MsgTree<K>
impl<K> Unpin for MsgTree<K>
impl<K> UnsafeUnpin for MsgTree<K>
impl<K> UnwindSafe for MsgTree<K>
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