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.
Trait Implementations§
Source§impl<V: Default> Default for ManagedInspectQueue<V>
impl<V: Default> Default for ManagedInspectQueue<V>
Source§fn default() -> ManagedInspectQueue<V>
fn default() -> ManagedInspectQueue<V>
Auto Trait Implementations§
impl<V> Freeze for ManagedInspectQueue<V>
impl<V> !RefUnwindSafe for ManagedInspectQueue<V>
impl<V> Send for ManagedInspectQueue<V>where
V: Send,
impl<V> Sync for ManagedInspectQueue<V>where
V: Sync,
impl<V> Unpin for ManagedInspectQueue<V>where
V: Unpin,
impl<V> !UnwindSafe for ManagedInspectQueue<V>
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
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>
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>
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