pub struct CuListsManager<P, const N: usize>where
P: CopperListTuple,{ /* 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, const N: usize> CuListsManager<P, N>where
P: CopperListTuple,
impl<P, const N: usize> CuListsManager<P, N>where
P: CopperListTuple,
pub fn new() -> CuListsManager<P, N>where
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,
) -> Chain<Rev<Iter<'_, CopperList<P>>>, Rev<Iter<'_, CopperList<P>>>> ⓘ
pub fn iter( &self, ) -> Chain<Rev<Iter<'_, CopperList<P>>>, Rev<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,
) -> Chain<Rev<IterMut<'_, CopperList<P>>>, Rev<IterMut<'_, CopperList<P>>>> ⓘ
pub fn iter_mut( &mut self, ) -> Chain<Rev<IterMut<'_, CopperList<P>>>, Rev<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,
) -> Chain<Iter<'_, CopperList<P>>, Iter<'_, CopperList<P>>> ⓘ
pub fn asc_iter( &self, ) -> Chain<Iter<'_, CopperList<P>>, Iter<'_, 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,
) -> Chain<IterMut<'_, CopperList<P>>, IterMut<'_, CopperList<P>>> ⓘ
pub fn asc_iter_mut( &mut self, ) -> Chain<IterMut<'_, CopperList<P>>, IterMut<'_, 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, const N: usize> Debug for CuListsManager<P, N>where
P: CopperListTuple + Debug,
impl<P, const N: usize> Debug for CuListsManager<P, N>where
P: CopperListTuple + Debug,
Source§impl<P, const N: usize> Default for CuListsManager<P, N>where
P: CopperListTuple + CuListZeroedInit,
impl<P, const N: usize> Default for CuListsManager<P, N>where
P: CopperListTuple + CuListZeroedInit,
Source§fn default() -> CuListsManager<P, N>
fn default() -> 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