pub struct SeamQueue { /* private fields */ }Expand description
One seam’s bounded queue. Clones share the queue.
Implementations§
Source§impl SeamQueue
impl SeamQueue
Sourcepub fn new(in_flight: u32, capacity: u32) -> Result<Self, String>
pub fn new(in_flight: u32, capacity: u32) -> Result<Self, String>
Both limits must lie in 1 to MAX_SEAM_LIMIT.
Sourcepub fn try_enter(&self) -> Result<Slot, QueueFull>
pub fn try_enter(&self) -> Result<Slot, QueueFull>
Admit a call, or refuse it at once when the queue is full.
Sourcepub fn count_late(&self)
pub fn count_late(&self)
Count a response discarded because its caller stopped waiting.
pub fn counters(&self) -> SeamCounters
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SeamQueue
impl RefUnwindSafe for SeamQueue
impl Send for SeamQueue
impl Sync for SeamQueue
impl Unpin for SeamQueue
impl UnsafeUnpin for SeamQueue
impl UnwindSafe for SeamQueue
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