pub struct ManagedInspectQueue<V> { /* private fields */ }
Expand description
A queue that wraps an inspect node and attaches all inserted values to the node.
This class can either be explicitly given an inspect node through ManagedInspectQueue::with_node or can create its own inspect node when included in a struct that derives Inspect or when [ManagedInspectQueue::with_inspect] is called. ManagedInspectQueue will only keep the last [size_limit] items.
Implementations§
Source§impl<V> ManagedInspectQueue<V>
impl<V> ManagedInspectQueue<V>
Sourcepub fn new(size_limit: usize) -> Self
pub fn new(size_limit: usize) -> Self
Creates a new ManagedInspectQueue with a default node. This gives the parent
the option to call with_inspect
itself instead of passing a node into with_node
.
Sourcepub fn with_node(node: Node, size_limit: usize) -> Self
pub fn with_node(node: Node, size_limit: usize) -> Self
Creates a new ManagedInspectQueue that attaches inserted values to the given node. A size limit of 0 indicates an unlimited length.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, V>
pub fn iter_mut(&mut self) -> IterMut<'_, V>
Returns a mutable iterator for the underlying queue.
Sourcepub fn items_mut(&mut self) -> &mut VecDeque<V>
pub fn items_mut(&mut self) -> &mut VecDeque<V>
Returns a mutable reference to the underlying queue. Items should be inserted with this reference.
Sourcepub fn inspect_node(&self) -> &Node
pub fn inspect_node(&self) -> &Node
Returns a reference to the ManagedInspectQueue’s node.