pub struct EntityListIter<E: Entity> {
pub first: Option<E>,
pub last: Option<E>,
}
Expand description
EntityList<E>
iterator, but with a different API than Iterator
.
This can also be considered a (non-random-access) “subslice” of the list.
Fields§
§first: Option<E>
§last: Option<E>
Implementations§
Source§impl<E: Entity<Def = EntityListNode<E, D>>, D> EntityListIter<E>
impl<E: Entity<Def = EntityListNode<E, D>>, D> EntityListIter<E>
pub fn split_first(self, defs: &EntityDefs<E>) -> Option<(E, Self)>
pub fn split_last(self, defs: &EntityDefs<E>) -> Option<(E, Self)>
Trait Implementations§
Source§impl<E: Clone + Entity> Clone for EntityListIter<E>
impl<E: Clone + Entity> Clone for EntityListIter<E>
Source§fn clone(&self) -> EntityListIter<E>
fn clone(&self) -> EntityListIter<E>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<E: Copy + Entity> Copy for EntityListIter<E>
Auto Trait Implementations§
impl<E> Freeze for EntityListIter<E>where
E: Freeze,
impl<E> RefUnwindSafe for EntityListIter<E>where
E: RefUnwindSafe,
impl<E> Send for EntityListIter<E>where
E: Send,
impl<E> Sync for EntityListIter<E>where
E: Sync,
impl<E> Unpin for EntityListIter<E>where
E: Unpin,
impl<E> UnwindSafe for EntityListIter<E>where
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
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