pub struct Queue<'a, H: QueueHeader> { /* private fields */ }Implementations§
Source§impl<'a, H: QueueHeader> Queue<'a, H>
impl<'a, H: QueueHeader> Queue<'a, H>
pub fn new(header: RefMut<'a, H>, buf: RefMut<'a, [H::Item]>) -> Self
pub fn len(&self) -> u64
pub fn full(&self) -> bool
pub fn empty(&self) -> bool
pub fn push_back(&mut self, value: H::Item) -> Result<(), H::Item>
pub fn peek_front(&self) -> Option<&H::Item>
pub fn peek_front_mut(&mut self) -> Option<&mut H::Item>
pub fn pop_front(&mut self) -> Result<H::Item, ()>
pub fn revert_pushes(&mut self, desired_len: u64) -> DexResult<()>
pub fn iter(&self) -> impl Iterator<Item = &H::Item>
Auto Trait Implementations§
impl<'a, H> Freeze for Queue<'a, H>
impl<'a, H> !RefUnwindSafe for Queue<'a, H>
impl<'a, H> !Send for Queue<'a, H>
impl<'a, H> !Sync for Queue<'a, H>
impl<'a, H> Unpin for Queue<'a, H>
impl<'a, H> !UnwindSafe for Queue<'a, H>
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
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>
Converts
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>
Converts
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