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 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_register<'target>( &'target self, position: usize, slot: &mut Registration<'target, 'd>, wake: &Waker<'d>, ) -> Result<(), Error>
pub fn try_wake_one( &self, position: usize, ) -> Result<Once, Bounds<NonZero<u32>>>
Source§impl<'scope, 'd> Queue<'d, Scope<'scope>>
impl<'scope, 'd> Queue<'d, Scope<'scope>>
pub fn try_index( &self, position: usize, ) -> Result<Index<'scope>, Bounds<NonZero<u32>>>
pub fn try_register<'target>( &'target self, index: Index<'scope>, slot: &mut Registration<'target, 'd, Scope<'scope>>, wake: &Waker<'d>, ) -> Result<(), Reject>
pub fn wake_one(&self, index: Index<'scope>) -> Once
Source§impl<'d, L> Queue<'d, L>
impl<'d, L> Queue<'d, L>
Sourcepub fn try_first<'target>(
&'target self,
slot: &mut Registration<'target, 'd, L>,
wake: &Waker<'d>,
) -> Result<(), Reject>
pub fn try_first<'target>( &'target self, slot: &mut Registration<'target, 'd, L>, wake: &Waker<'d>, ) -> Result<(), Reject>
Registers one wake in the constructor-proved first lane.
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> Unpin for Queue<'d, L>
impl<'d, L> UnsafeUnpin for Queue<'d, L>where
Fifo<Retained<'d>, L>: 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