pub struct AsList<E>(/* private fields */);Implementations§
Source§impl<E> AsList<E>
impl<E> AsList<E>
pub fn new(values: impl IntoIterator<Item = E>) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn empty(&mut self) -> &mut Self
pub fn nth(&self, index: usize) -> Option<&E>
pub fn peek_first(&self) -> Option<&E>
pub fn peek_last(&self) -> Option<&E>
pub fn pop_first(&mut self) -> Option<E>
pub fn pop_last(&mut self) -> Option<E>
pub fn push_first(&mut self, value: E) -> &mut Self
pub fn push_last(&mut self, value: E) -> &mut Self
pub fn iter(&self) -> impl Iterator<Item = &E>
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for AsList<E>
impl<E> RefUnwindSafe for AsList<E>where
VecDeque<E>: RefUnwindSafe,
impl<E> Send for AsList<E>
impl<E> Sync for AsList<E>
impl<E> Unpin for AsList<E>
impl<E> UnsafeUnpin for AsList<E>where
VecDeque<E>: UnsafeUnpin,
impl<E> UnwindSafe for AsList<E>where
VecDeque<E>: 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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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