pub struct CommandQueue { /* private fields */ }Expand description
Priority command queue
Implementations§
Source§impl CommandQueue
impl CommandQueue
Sourcepub fn enqueue(&mut self, command: PrioritizedCommand) -> Result<(), QueueError>
pub fn enqueue(&mut self, command: PrioritizedCommand) -> Result<(), QueueError>
Enqueue a command with priority
Sourcepub fn enqueue_simple(
&mut self,
command: BackendCommand,
) -> Result<(), QueueError>
pub fn enqueue_simple( &mut self, command: BackendCommand, ) -> Result<(), QueueError>
Enqueue a simple command (no priority metadata)
Sourcepub fn dequeue(&mut self) -> Option<QueueEntry>
pub fn dequeue(&mut self) -> Option<QueueEntry>
Dequeue the highest priority command
Sourcepub fn peek(&self) -> Option<&QueueEntry>
pub fn peek(&self) -> Option<&QueueEntry>
Peek at the highest priority command without removing it
Sourcepub fn requeue_for_retry(&mut self, entry: QueueEntry) -> Result<(), QueueError>
pub fn requeue_for_retry(&mut self, entry: QueueEntry) -> Result<(), QueueError>
Re-enqueue a command for retry
Sourcepub fn stats(&self) -> QueueStats
pub fn stats(&self) -> QueueStats
Get queue statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandQueue
impl RefUnwindSafe for CommandQueue
impl Send for CommandQueue
impl Sync for CommandQueue
impl Unpin for CommandQueue
impl UnsafeUnpin for CommandQueue
impl UnwindSafe for CommandQueue
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