pub struct ChainedCol<I1, I2, E1, E2>{ /* private fields */ }
Expand description
An iterable collection created by chaining two iterable collections.
Trait Implementations§
Source§impl<I1, I2, E1, E2> Collection for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> Collection for ChainedCol<I1, I2, E1, E2>
Source§type Item = <I1 as Collection>::Item
type Item = <I1 as Collection>::Item
Type of elements stored by the collection.
Source§type Iterable<'i> = &'i ChainedCol<I1, I2, E1, E2>
where
Self: 'i
type Iterable<'i> = &'i ChainedCol<I1, I2, E1, E2> where Self: 'i
Related type implementing
Iterable
trait that the as_iterable
method returns.
If the type of the Collection
is X
, the corresponding Iterable
type is almost
always &X
due to the following relation among the both traits. Read moreSource§fn as_iterable(&self) -> Self::Iterable<'_>
fn as_iterable(&self) -> Self::Iterable<'_>
Returns the corresponding
Iterable
type of this collection, which is often nothing but &Self
.Source§fn iter(&self) -> <Self::Iterable<'_> as Iterable>::Iter
fn iter(&self) -> <Self::Iterable<'_> as Iterable>::Iter
Creates a new iterator yielding references to the elements of the collection; i.e.,
type of elements is
&Collection::Item
.Source§fn into_chained<I>(self, other: I) -> ChainedCol<Self, I, Self, I>
fn into_chained<I>(self, other: I) -> ChainedCol<Self, I, Self, I>
Consumes this collection and
other
; creates an iterable collection which is a chain of these two
collections. Read moreSource§fn into_filtered<P>(self, filter: P) -> FilteredCol<Self, Self, P>
fn into_filtered<P>(self, filter: P) -> FilteredCol<Self, Self, P>
Consumes this collection and creates an iterable collection which is a filtered version of this collection. Read more
Source§fn into_flattened(self) -> FlattenedCol<Self, Self>where
Self: Sized,
Self::Item: IntoIterator,
for<'i> &'i Self::Item: IntoIterator<Item = &'i <Self::Item as IntoIterator>::Item>,
fn into_flattened(self) -> FlattenedCol<Self, Self>where
Self: Sized,
Self::Item: IntoIterator,
for<'i> &'i Self::Item: IntoIterator<Item = &'i <Self::Item as IntoIterator>::Item>,
Consumes this collection and creates an iterable collection which is a flattened version of this collection. Read more
Source§fn into_fused(self) -> FusedCol<Self, Self>where
Self: Sized,
fn into_fused(self) -> FusedCol<Self, Self>where
Self: Sized,
Consumes this collection and creates an iterable collection which is a fused version of this collection. Read more
Source§fn into_reversed(self) -> ReversedCol<Self, Self>
fn into_reversed(self) -> ReversedCol<Self, Self>
Consumes this collection and creates an iterable collection which is a reversed version of this collection. Read more
Source§fn into_skipped(self, n: usize) -> SkippedCol<Self, Self>where
Self: Sized,
fn into_skipped(self, n: usize) -> SkippedCol<Self, Self>where
Self: Sized,
Consumes this collection and creates an iterable collection which is skipped-by-
n
version of this collection. Read moreSource§fn into_skipped_while<P>(self, skip_while: P) -> SkippedWhileCol<Self, Self, P>
fn into_skipped_while<P>(self, skip_while: P) -> SkippedWhileCol<Self, Self, P>
Consumes this collection and creates an iterable collection which is skipped-while version of this collection. Read more
Source§fn into_stepped_by(self, step: usize) -> SteppedByCol<Self, Self>where
Self: Sized,
fn into_stepped_by(self, step: usize) -> SteppedByCol<Self, Self>where
Self: Sized,
Consumes this collection and creates an iterable collection which is stepped-by-
step
version of this collection. Read moreSource§fn into_taken(self, n: usize) -> TakenCol<Self, Self>where
Self: Sized,
fn into_taken(self, n: usize) -> TakenCol<Self, Self>where
Self: Sized,
Consumes this collection and creates an iterable collection which is taken-
n
version of this collection. Read moreSource§fn into_taken_while<P>(self, take_while: P) -> TakenWhileCol<Self, Self, P>
fn into_taken_while<P>(self, take_while: P) -> TakenWhileCol<Self, Self, P>
Consumes this collection and creates an iterable collection which is taken-while version of this collection. Read more
Source§impl<I1, I2, E1, E2> CollectionMut for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> CollectionMut for ChainedCol<I1, I2, E1, E2>
Source§type IterMut<'i> = Chain<<I1 as CollectionMut>::IterMut<'i>, <I2 as CollectionMut>::IterMut<'i>>
where
Self: 'i
type IterMut<'i> = Chain<<I1 as CollectionMut>::IterMut<'i>, <I2 as CollectionMut>::IterMut<'i>> where Self: 'i
Type of the iterator yielding mutable references created by the
iter_mut
method.Source§fn iter_mut(&mut self) -> Self::IterMut<'_>
fn iter_mut(&mut self) -> Self::IterMut<'_>
Creates a new iterator yielding mutable references to the elements of the collection; i.e.,
type of elements is
&mut Collection::Item
.Source§fn chained_mut<'a, I>(
&'a mut self,
other: &'a mut I,
) -> ChainedCol<Self, I, &'a mut Self, &'a mut I>
fn chained_mut<'a, I>( &'a mut self, other: &'a mut I, ) -> ChainedCol<Self, I, &'a mut Self, &'a mut I>
Combines mutable references of this collection and
other
; and creates an iterable collection which
is a chain of these two collections. Read moreSource§fn filtered_mut<P>(&mut self, filter: P) -> FilteredCol<Self, &mut Self, P>
fn filtered_mut<P>(&mut self, filter: P) -> FilteredCol<Self, &mut Self, P>
Creates an iterable collection view which is a filtered version of this collection from its mutable reference. Read more
Source§fn flattened_mut(&mut self) -> FlattenedCol<Self, &mut Self>where
Self: Sized,
Self::Item: IntoIterator,
for<'i> &'i Self::Item: IntoIterator<Item = &'i <Self::Item as IntoIterator>::Item>,
for<'i> &'i mut Self::Item: IntoIterator<Item = &'i mut <Self::Item as IntoIterator>::Item>,
fn flattened_mut(&mut self) -> FlattenedCol<Self, &mut Self>where
Self: Sized,
Self::Item: IntoIterator,
for<'i> &'i Self::Item: IntoIterator<Item = &'i <Self::Item as IntoIterator>::Item>,
for<'i> &'i mut Self::Item: IntoIterator<Item = &'i mut <Self::Item as IntoIterator>::Item>,
Creates an iterable collection view which is a flattened version of this collection from its mutable reference. Read more
Source§fn fused_mut(&mut self) -> FusedCol<Self, &mut Self>where
Self: Sized,
fn fused_mut(&mut self) -> FusedCol<Self, &mut Self>where
Self: Sized,
Creates an iterable collection view which is a fused version of this collection from its mutable reference. Read more
Source§fn reversed_mut(&mut self) -> ReversedCol<Self, &mut Self>where
Self: Sized,
for<'b> <Self::Iterable<'b> as Iterable>::Iter: DoubleEndedIterator,
for<'b> Self::IterMut<'b>: DoubleEndedIterator,
fn reversed_mut(&mut self) -> ReversedCol<Self, &mut Self>where
Self: Sized,
for<'b> <Self::Iterable<'b> as Iterable>::Iter: DoubleEndedIterator,
for<'b> Self::IterMut<'b>: DoubleEndedIterator,
Creates an iterable collection view which is a reversed version of this collection from its mutable reference. Read more
Source§fn skipped_mut(&mut self, n: usize) -> SkippedCol<Self, &mut Self>where
Self: Sized,
fn skipped_mut(&mut self, n: usize) -> SkippedCol<Self, &mut Self>where
Self: Sized,
Creates an iterable collection view which is skipped-by-
n
version of this collection from its mutable reference. Read moreSource§fn skipped_while_mut<P>(
&mut self,
skip_while: P,
) -> SkippedWhileCol<Self, &mut Self, P>
fn skipped_while_mut<P>( &mut self, skip_while: P, ) -> SkippedWhileCol<Self, &mut Self, P>
Creates an iterable collection view which is skipped-while version of this collection from its mutable reference. Read more
Source§fn stepped_by_mut(&mut self, step: usize) -> SteppedByCol<Self, &mut Self>where
Self: Sized,
fn stepped_by_mut(&mut self, step: usize) -> SteppedByCol<Self, &mut Self>where
Self: Sized,
Creates an iterable collection view which is stepped-by-
step
version of this collection from its mutable reference. Read moreSource§fn taken_mut(&mut self, n: usize) -> TakenCol<Self, &mut Self>where
Self: Sized,
fn taken_mut(&mut self, n: usize) -> TakenCol<Self, &mut Self>where
Self: Sized,
Creates an iterable collection view which is taken-
n
version of this collection from its mutable reference. Read moreSource§fn taken_while_mut<P>(
&mut self,
take_while: P,
) -> TakenWhileCol<Self, &mut Self, P>
fn taken_while_mut<P>( &mut self, take_while: P, ) -> TakenWhileCol<Self, &mut Self, P>
Creates an iterable collection view which is taken-while version of this collection from its mutable reference. Read more
Source§impl<I1, I2, E1, E2> CollectionMutObj for ChainedCol<I1, I2, E1, E2>where
I1: CollectionMut,
I2: CollectionMut<Item = <I1 as Collection>::Item>,
E1: SoM<I1>,
E2: SoM<I2>,
impl<I1, I2, E1, E2> CollectionMutObj for ChainedCol<I1, I2, E1, E2>where
I1: CollectionMut,
I2: CollectionMut<Item = <I1 as Collection>::Item>,
E1: SoM<I1>,
E2: SoM<I2>,
Source§impl<I1, I2, E1, E2> CollectionObj for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> CollectionObj for ChainedCol<I1, I2, E1, E2>
Source§impl<'a, I1, I2, E1, E2> Iterable for &'a ChainedCol<I1, I2, E1, E2>
impl<'a, I1, I2, E1, E2> Iterable for &'a ChainedCol<I1, I2, E1, E2>
Source§type Item = &'a <I1 as Collection>::Item
type Item = &'a <I1 as Collection>::Item
Type of the item that the iterators created by the
iter
method yields.Source§type Iter = Chain<<<I1 as Collection>::Iterable<'a> as Iterable>::Iter, <<I2 as Collection>::Iterable<'a> as Iterable>::Iter>
type Iter = Chain<<<I1 as Collection>::Iterable<'a> as Iterable>::Iter, <<I2 as Collection>::Iterable<'a> as Iterable>::Iter>
Type of the iterator created by the
iter
method.Source§fn iter(&self) -> Self::Iter
fn iter(&self) -> Self::Iter
Creates a new iterator from this iterable yielding elements of type
Iterable::Item
.Source§fn chained<I>(self, other: I) -> Chained<Self, I>
fn chained<I>(self, other: I) -> Chained<Self, I>
Takes two iterables and creates a new iterable over both in sequence. Read more
Source§fn cloned<'a, T>(self) -> Cloned<'a, T, Self>
fn cloned<'a, T>(self) -> Cloned<'a, T, Self>
Creates an iterable, iterators of which clone all of its elements. Read more
Source§fn copied<'a, T>(self) -> Copied<'a, T, Self>
fn copied<'a, T>(self) -> Copied<'a, T, Self>
Creates an iterable, iterators of which copy all of its elements. Read more
Source§fn enumerated(self) -> Enumerated<Self>where
Self: Sized,
fn enumerated(self) -> Enumerated<Self>where
Self: Sized,
Creates an iterable which gives the current iteration count as well as the next value. Read more
Source§fn filter_mapped<M, U>(self, filter_map: M) -> FilterMapped<Self, M, U>
fn filter_mapped<M, U>(self, filter_map: M) -> FilterMapped<Self, M, U>
Creates an iterable that both filters and maps. Read more
Source§fn filtered<P>(self, filter: P) -> Filtered<Self, P>
fn filtered<P>(self, filter: P) -> Filtered<Self, P>
Creates an iterable which uses a closure to determine if an element should be yielded. Read more
Source§fn flat_mapped<M, U>(self, flat_map: M) -> FlatMapped<Self, M, U>
fn flat_mapped<M, U>(self, flat_map: M) -> FlatMapped<Self, M, U>
Creates an iterable that works like map, but flattens nested structure. Read more
Source§fn flattened(self) -> Flattened<Self>
fn flattened(self) -> Flattened<Self>
Creates an iterable that flattens nested structure. Read more
Source§fn fused(self) -> Fused<Self>where
Self: Sized,
fn fused(self) -> Fused<Self>where
Self: Sized,
Creates an iterable which ends after the first
None
. Read moreSource§fn mapped_while<M, U>(self, map_while: M) -> MappedWhile<Self, M, U>
fn mapped_while<M, U>(self, map_while: M) -> MappedWhile<Self, M, U>
Creates an iterable that both yields elements based on a predicate and maps. Read more
Source§fn mapped<M, U>(self, map: M) -> Mapped<Self, M, U>
fn mapped<M, U>(self, map: M) -> Mapped<Self, M, U>
Takes a closure and creates an iterable which calls that closure on each element. Read more
Source§fn reversed(self) -> Reversed<Self>
fn reversed(self) -> Reversed<Self>
Creates an iterable iterators of which reverses the traversal direction. Read more
Source§fn skipped(self, n: usize) -> Skipped<Self>where
Self: Sized,
fn skipped(self, n: usize) -> Skipped<Self>where
Self: Sized,
Creates an iterable, iterators of which skip the first
n
elements. Read moreSource§fn skipped_while<P>(self, skip_while: P) -> SkippedWhile<Self, P>
fn skipped_while<P>(self, skip_while: P) -> SkippedWhile<Self, P>
Creates an iterable, iterators of which skip elements based on a predicate. Read more
Source§fn stepped_by(self, step: usize) -> SteppedBy<Self>where
Self: Sized,
fn stepped_by(self, step: usize) -> SteppedBy<Self>where
Self: Sized,
Creates an iterable starting at the same point, but stepping by the given amount at each iteration. Read more
Source§fn taken(self, n: usize) -> Taken<Self>where
Self: Sized,
fn taken(self, n: usize) -> Taken<Self>where
Self: Sized,
Creates an iterable whose iterators yield the first
n
elements, or fewer if the underlying iterator ends sooner. Read moreSource§fn taken_while<P>(self, take_while: P) -> TakenWhile<Self, P>
fn taken_while<P>(self, take_while: P) -> TakenWhile<Self, P>
Creates an iterable, iterators of which yield elements based on a predicate. Read more
Source§impl<'a, I1, I2, E1, E2> IterableObj for &'a ChainedCol<I1, I2, E1, E2>
impl<'a, I1, I2, E1, E2> IterableObj for &'a ChainedCol<I1, I2, E1, E2>
Source§type Item = &'a <I1 as Collection>::Item
type Item = &'a <I1 as Collection>::Item
Type of the item that the iterators created by the
boxed_iter
method yields.Auto Trait Implementations§
impl<I1, I2, E1, E2> Freeze for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> RefUnwindSafe for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> Send for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> Sync for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> Unpin for ChainedCol<I1, I2, E1, E2>
impl<I1, I2, E1, E2> UnwindSafe for ChainedCol<I1, I2, E1, E2>
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