pub struct Queue<'d, L = NonZero<usize>> { /* private fields */ }Expand description
Bounded FIFO wakes with a constructor-proved lane extent.
Implementations§
Source§impl<'d> Queue<'d>
impl<'d> Queue<'d>
Sourcepub fn wake_one(source: Proof<(&Self, usize), Physical>) -> Once
pub fn wake_one(source: Proof<(&Self, usize), Physical>) -> Once
Wakes one entry in the lane retained by this exact queue’s physical proof.
Sourcepub fn try_with<S, R>(
driver: Reference<'d>,
capacity: usize,
lanes: NonZero<usize>,
source: S,
run: impl for<'scope> FnOnce(&'scope S, Queue<'d, Scope<'scope>>) -> R,
) -> Result<R, Error>
pub fn try_with<S, R>( driver: Reference<'d>, capacity: usize, lanes: NonZero<usize>, source: S, run: impl for<'scope> FnOnce(&'scope S, Queue<'d, Scope<'scope>>) -> R, ) -> Result<R, Error>
Creates one queue and borrows its source under a fresh invariant scope.
pub fn try_wake_one( &self, position: usize, ) -> Result<Once, Bounds<NonZero<u32>>>
Source§impl<'d, L> Queue<'d, L>
impl<'d, L> Queue<'d, L>
Sourcepub fn cancel(&self, slot: &mut Registration<'_, 'd, L>) -> Once
pub fn cancel(&self, slot: &mut Registration<'_, 'd, L>) -> Once
Cancels the registration, forwarding a taken wake within its original lane.
Active drains retain their work; successful admission uses clear.
Sourcepub fn wake_first(&self) -> Once
pub fn wake_first(&self) -> Once
Wakes one registration from lane zero.
pub fn wake_next(&self) -> Once
pub fn has_waiters(&self) -> bool
pub fn begin_drain(&self)
pub fn is_draining(&self) -> bool
pub fn drain_one(&self, work: Work<'_, 'd>) -> Drain
Auto Trait Implementations§
impl<'d, L = NonZero<usize>> !Freeze for Queue<'d, L>
impl<'d, L = NonZero<usize>> !RefUnwindSafe for Queue<'d, L>
impl<'d, L = NonZero<usize>> !Send for Queue<'d, L>
impl<'d, L = NonZero<usize>> !Sync for Queue<'d, L>
impl<'d, L = NonZero<usize>> !UnwindSafe for Queue<'d, L>
impl<'d, L> Forget for Queue<'d, L>
impl<'d, L> Move for Queue<'d, L>
impl<'d, L> Unpin for Queue<'d, L>
impl<'d, L> UnsafeUnpin for Queue<'d, L>where
Root<'d, Shared<Context<Receive>>>: UnsafeUnpin,
PhantomData<(fn(&'d ()) -> &'d (), ThreadBound)>: UnsafeUnpin,
*const Node<Entry<Retained<'d>>> is !null: UnsafeUnpin,
*const Node<Chain> is !null: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<(Node<Entry<Retained<'d>>>, Node<Chain>, L, ())>: UnsafeUnpin,
PhantomData<(ThreadBound, !)>: UnsafeUnpin,
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