• Home
  • Raw
  • Download

Lines Matching refs:I

30 pub struct Interleave<I, J> {
31 a: Fuse<I>,
41 pub fn interleave<I, J>(i: I, j: J) -> Interleave<<I as IntoIterator>::IntoIter, <J as IntoIterator… in interleave() argument
42 where I: IntoIterator, in interleave()
43 J: IntoIterator<Item = I::Item> in interleave()
52 impl<I, J> Iterator for Interleave<I, J>
53 where I: Iterator,
54 J: Iterator<Item = I::Item>
56 type Item = I::Item;
87 pub struct InterleaveShortest<I, J>
88 where I: Iterator,
89 J: Iterator<Item = I::Item>
91 it0: I,
97 pub fn interleave_shortest<I, J>(a: I, b: J) -> InterleaveShortest<I, J> in interleave_shortest() argument
98 where I: Iterator, in interleave_shortest()
99 J: Iterator<Item = I::Item> in interleave_shortest()
108 impl<I, J> Iterator for InterleaveShortest<I, J>
109 where I: Iterator,
110 J: Iterator<Item = I::Item>
112 type Item = I::Item;
165 pub struct PutBack<I>
166 where I: Iterator
168 top: Option<I::Item>,
169 iter: I,
173 pub fn put_back<I>(iterable: I) -> PutBack<I::IntoIter> in put_back()
174 where I: IntoIterator in put_back()
182 impl<I> PutBack<I>
183 where I: Iterator
186 pub fn with_value(mut self, value: I::Item) -> Self { in with_value()
193 pub fn into_parts(self) -> (Option<I::Item>, I) { in into_parts() argument
202 pub fn put_back(&mut self, x: I::Item) { in put_back()
207 impl<I> Iterator for PutBack<I>
208 where I: Iterator
210 type Item = I::Item;
276 pub struct Product<I, J>
277 where I: Iterator
279 a: I,
280 a_cur: Option<I::Item>,
288 pub fn cartesian_product<I, J>(mut i: I, j: J) -> Product<I, J> in cartesian_product() argument
289 where I: Iterator, in cartesian_product()
291 I::Item: Clone in cartesian_product()
301 impl<I, J> Iterator for Product<I, J>
302 where I: Iterator,
304 I::Item: Clone
306 type Item = (I::Item, J::Item);
372 pub struct Batching<I, F> {
374 iter: I,
377 impl<I, F> fmt::Debug for Batching<I, F> where I: fmt::Debug {
382 pub fn batching<I, F>(iter: I, f: F) -> Batching<I, F> { in batching() argument
386 impl<B, F, I> Iterator for Batching<I, F>
387 where I: Iterator,
388 F: FnMut(&mut I) -> Option<B>
408 pub struct Step<I> {
409 iter: Fuse<I>,
417 pub fn step<I>(iter: I, step: usize) -> Step<I> in step() argument
418 where I: Iterator in step()
428 impl<I> Iterator for Step<I>
429 where I: Iterator
431 type Item = I::Item;
456 impl<I> ExactSizeIterator for Step<I>
457 where I: ExactSizeIterator
480 pub type Merge<I, J> = MergeBy<I, J, MergeLte>;
493 pub fn merge<I, J>(i: I, j: J) -> Merge<<I as IntoIterator>::IntoIter, <J as IntoIterator>::IntoIte… in merge() argument
494 where I: IntoIterator, in merge()
495 J: IntoIterator<Item = I::Item>, in merge()
496 I::Item: PartialOrd in merge()
508 pub struct MergeBy<I, J, F>
509 where I: Iterator,
510 J: Iterator<Item = I::Item>
512 a: Peekable<I>,
518 impl<I, J, F> fmt::Debug for MergeBy<I, J, F>
519 where I: Iterator + fmt::Debug, J: Iterator<Item = I::Item> + fmt::Debug,
520 I::Item: fmt::Debug,
532 pub fn merge_by_new<I, J, F>(a: I, b: J, cmp: F) -> MergeBy<I::IntoIter, J::IntoIter, F> in merge_by_new() argument
533 where I: IntoIterator, in merge_by_new()
534 J: IntoIterator<Item = I::Item>, in merge_by_new()
535 F: MergePredicate<I::Item>, in merge_by_new()
545 impl<I, J, F> Clone for MergeBy<I, J, F>
546 where I: Iterator,
547 J: Iterator<Item = I::Item>,
548 Peekable<I>: Clone,
555 impl<I, J, F> Iterator for MergeBy<I, J, F>
556 where I: Iterator,
557 J: Iterator<Item = I::Item>,
558 F: MergePredicate<I::Item>
560 type Item = I::Item;
596 pub struct TakeWhileRef<'a, I: 'a, F> {
597 iter: &'a mut I,
601 impl<'a, I, F> fmt::Debug for TakeWhileRef<'a, I, F>
602 where I: Iterator + fmt::Debug,
608 pub fn take_while_ref<I, F>(iter: &mut I, f: F) -> TakeWhileRef<I, F> in take_while_ref() argument
609 where I: Iterator + Clone in take_while_ref()
614 impl<'a, I, F> Iterator for TakeWhileRef<'a, I, F>
615 where I: Iterator + Clone,
616 F: FnMut(&I::Item) -> bool
618 type Item = I::Item;
646 pub struct WhileSome<I> {
647 iter: I,
651 pub fn while_some<I>(iter: I) -> WhileSome<I> { in while_some() argument
655 impl<I, A> Iterator for WhileSome<I>
656 where I: Iterator<Item = Option<A>>
679 pub struct TupleCombinations<I, T>
680 where I: Iterator,
681 T: HasCombination<I>
684 _mi: PhantomData<I>,
688 pub trait HasCombination<I>: Sized {
689 type Combination: From<I> + Iterator<Item = Self>;
693 pub fn tuple_combinations<T, I>(iter: I) -> TupleCombinations<I, T> in tuple_combinations() argument
694 where I: Iterator + Clone, in tuple_combinations()
695 I::Item: Clone, in tuple_combinations()
696 T: HasCombination<I>, in tuple_combinations() argument
705 impl<I, T> Iterator for TupleCombinations<I, T>
706 where I: Iterator,
707 T: HasCombination<I>,
717 pub struct Tuple1Combination<I> {
718 iter: I,
721 impl<I> From<I> for Tuple1Combination<I> {
722 fn from(iter: I) -> Self { in from()
727 impl<I: Iterator> Iterator for Tuple1Combination<I> {
728 type Item = (I::Item,);
735 impl<I: Iterator> HasCombination<I> for (I::Item,) {
736 type Combination = Tuple1Combination<I>;
740 ($C:ident $P:ident ; $A:ident, $($I:ident),* ; $($X:ident)*) => (
742 pub struct $C<I: Iterator> {
743 item: Option<I::Item>,
744 iter: I,
745 c: $P<I>,
748 impl<I: Iterator + Clone> From<I> for $C<I> {
749 fn from(mut iter: I) -> Self {
758 impl<I: Iterator + Clone> From<I> for $C<Fuse<I>> {
759 fn from(iter: I) -> Self {
769 impl<I, $A> Iterator for $C<I>
770 where I: Iterator<Item = $A> + Clone,
771 I::Item: Clone
773 type Item = ($($I),*);
789 impl<I, $A> HasCombination<I> for ($($I),*)
790 where I: Iterator<Item = $A> + Clone,
791 I::Item: Clone
793 type Combination = $C<Fuse<I>>;
828 pub struct FilterOk<I, F> {
829 iter: I,
834 pub fn filter_ok<I, F, T, E>(iter: I, f: F) -> FilterOk<I, F> in filter_ok() argument
835 where I: Iterator<Item = Result<T, E>>, in filter_ok()
844 impl<I, F, T, E> Iterator for FilterOk<I, F>
845 where I: Iterator<Item = Result<T, E>>,
891 pub struct FilterMapOk<I, F> {
892 iter: I,
905 pub fn filter_map_ok<I, F, T, U, E>(iter: I, f: F) -> FilterMapOk<I, F> in filter_map_ok() argument
906 where I: Iterator<Item = Result<T, E>>, in filter_map_ok()
915 impl<I, F, T, U, E> Iterator for FilterMapOk<I, F>
916 where I: Iterator<Item = Result<T, E>>,
963 pub struct Positions<I, F> {
964 iter: I,
970 pub fn positions<I, F>(iter: I, f: F) -> Positions<I, F> in positions() argument
971 where I: Iterator, in positions()
972 F: FnMut(I::Item) -> bool, in positions()
981 impl<I, F> Iterator for Positions<I, F>
982 where I: Iterator,
983 F: FnMut(I::Item) -> bool,
1003 impl<I, F> DoubleEndedIterator for Positions<I, F>
1004 where I: DoubleEndedIterator + ExactSizeIterator,
1005 F: FnMut(I::Item) -> bool,
1022 pub struct Update<I, F> {
1023 iter: I,
1028 pub fn update<I, F>(iter: I, f: F) -> Update<I, F> in update() argument
1030 I: Iterator, in update()
1031 F: FnMut(&mut I::Item), in update()
1036 impl<I, F> Iterator for Update<I, F>
1038 I: Iterator,
1039 F: FnMut(&mut I::Item),
1041 type Item = I::Item;
1072 impl<I, F> ExactSizeIterator for Update<I, F>
1074 I: ExactSizeIterator,
1075 F: FnMut(&mut I::Item),
1078 impl<I, F> DoubleEndedIterator for Update<I, F>
1080 I: DoubleEndedIterator,
1081 F: FnMut(&mut I::Item),