pub struct CommandQueues { /* private fields */ }Expand description
Bounded, priority-aware command queues for a station or gateway shard.
Implementations§
Source§impl CommandQueues
impl CommandQueues
Sourcepub fn new(limits: CommandQueueLimits) -> Self
pub fn new(limits: CommandQueueLimits) -> Self
Creates empty command queues.
Sourcepub fn push(
&mut self,
command: CommandEnvelope,
ingress: CommandIngress,
) -> Result<CommandPushOutcome, CommandQueueError>
pub fn push( &mut self, command: CommandEnvelope, ingress: CommandIngress, ) -> Result<CommandPushOutcome, CommandQueueError>
Pushes a command through the barrier-aware ingress policy.
Sourcepub fn release_barrier_buffer(&mut self) -> Result<usize, CommandQueueError>
pub fn release_barrier_buffer(&mut self) -> Result<usize, CommandQueueError>
Moves commands buffered by a barrier back into priority queues.
If a target priority queue is full, the first blocked command and all commands after it remain in the barrier buffer for a later retry.
Sourcepub fn clear_barrier_buffer(&mut self) -> usize
pub fn clear_barrier_buffer(&mut self) -> usize
Drops commands buffered by a barrier.
Sourcepub fn pop_next(&mut self) -> Option<CommandEnvelope>
pub fn pop_next(&mut self) -> Option<CommandEnvelope>
Pops the next command, preferring high priority.
Sourcepub fn barrier_buffer_len(&self) -> usize
pub fn barrier_buffer_len(&self) -> usize
Returns command count buffered by an active barrier.
Sourcepub fn barrier_buffer_capacity(&self) -> usize
pub fn barrier_buffer_capacity(&self) -> usize
Maximum commands retained while a barrier buffers ingress.
The buffer uses the saturating sum of the three ready-queue limits so integrations get a bounded default without a separate hidden capacity.
Trait Implementations§
Source§impl Clone for CommandQueues
impl Clone for CommandQueues
Source§fn clone(&self) -> CommandQueues
fn clone(&self) -> CommandQueues
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CommandQueues
impl RefUnwindSafe for CommandQueues
impl Send for CommandQueues
impl Sync for CommandQueues
impl Unpin for CommandQueues
impl UnsafeUnpin for CommandQueues
impl UnwindSafe for CommandQueues
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