pub struct CuListsManager<P: CopperListTuple, const N: usize> { /* private fields */ }
Expand description
This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. P or Payload is typically a Tuple of various types of messages that are exchanged between tasks. N is the maximum number of in flight Copper List the runtime can support.
Implementations§
Source§impl<P: CopperListTuple, const N: usize> CuListsManager<P, N>
impl<P: CopperListTuple, const N: usize> CuListsManager<P, N>
pub fn new() -> Selfwhere
P: CuListZeroedInit,
pub fn create(&mut self) -> Option<&mut CopperList<P>>
Sourcepub fn peek(&self) -> Option<&CopperList<P>>
pub fn peek(&self) -> Option<&CopperList<P>>
Peeks at the last element in the queue.
pub fn pop(&mut self) -> Option<&mut CopperList<P>>
Sourcepub fn iter(&self) -> Iter<'_, CopperList<P>>
pub fn iter(&self) -> Iter<'_, CopperList<P>>
Returns an iterator over the queue’s contents.
The iterator goes from the most recently pushed items to the oldest ones.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, CopperList<P>>
pub fn iter_mut(&mut self) -> IterMut<'_, CopperList<P>>
Returns a mutable iterator over the queue’s contents.
The iterator goes from the most recently pushed items to the oldest ones.
Sourcepub fn asc_iter(&self) -> AscIter<'_, CopperList<P>>
pub fn asc_iter(&self) -> AscIter<'_, CopperList<P>>
Returns an ascending iterator over the queue’s contents.
The iterator goes from the least recently pushed items to the newest ones.
Sourcepub fn asc_iter_mut(&mut self) -> AscIterMut<'_, CopperList<P>>
pub fn asc_iter_mut(&mut self) -> AscIterMut<'_, CopperList<P>>
Returns a mutable ascending iterator over the queue’s contents.
The iterator goes from the least recently pushed items to the newest ones.
Trait Implementations§
Source§impl<P: CopperListTuple + CuListZeroedInit, const N: usize> Default for CuListsManager<P, N>
impl<P: CopperListTuple + CuListZeroedInit, const N: usize> Default for CuListsManager<P, N>
Auto Trait Implementations§
impl<P, const N: usize> Freeze for CuListsManager<P, N>
impl<P, const N: usize> RefUnwindSafe for CuListsManager<P, N>where
P: RefUnwindSafe,
impl<P, const N: usize> Send for CuListsManager<P, N>where
P: Send,
impl<P, const N: usize> Sync for CuListsManager<P, N>where
P: Sync,
impl<P, const N: usize> Unpin for CuListsManager<P, N>
impl<P, const N: usize> UnwindSafe for CuListsManager<P, N>where
P: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more