Lines Matching refs:Pair
193 pub fn pop(&mut self) -> Option<Pair<T, P>> { in pop()
195 self.last.take().map(|t| Pair::End(*t)) in pop()
197 self.inner.pop().map(|(t, p)| Pair::Punctuated(t, p)) in pop()
459 impl<T, P> FromIterator<Pair<T, P>> for Punctuated<T, P> {
460 fn from_iter<I: IntoIterator<Item = Pair<T, P>>>(i: I) -> Self { in from_iter()
467 impl<T, P> Extend<Pair<T, P>> for Punctuated<T, P> {
468 fn extend<I: IntoIterator<Item = Pair<T, P>>>(&mut self, i: I) { in extend()
480 Pair::Punctuated(a, b) => self.inner.push((a, b)), in extend()
481 Pair::End(a) => { in extend()
540 type Item = Pair<&'a T, &'a P>;
545 .map(|(t, p)| Pair::Punctuated(t, p)) in next()
546 .or_else(|| self.last.next().map(Pair::End)) in next()
558 .map(Pair::End) in next_back()
559 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
590 type Item = Pair<&'a mut T, &'a mut P>;
595 .map(|(t, p)| Pair::Punctuated(t, p)) in next()
596 .or_else(|| self.last.next().map(Pair::End)) in next()
608 .map(Pair::End) in next_back()
609 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
630 type Item = Pair<T, P>;
635 .map(|(t, p)| Pair::Punctuated(t, p)) in next()
636 .or_else(|| self.last.next().map(Pair::End)) in next()
648 .map(Pair::End) in next_back()
649 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
930 pub enum Pair<T, P> { enum
935 impl<T, P> Pair<T, P> { impl
940 Pair::Punctuated(t, _) | Pair::End(t) => t, in into_value()
947 Pair::Punctuated(t, _) | Pair::End(t) => t, in value()
954 Pair::Punctuated(t, _) | Pair::End(t) => t, in value_mut()
962 Pair::Punctuated(_, p) => Some(p), in punct()
963 Pair::End(_) => None, in punct()
987 Pair::Punctuated(_, p) => Some(p), in punct_mut()
988 Pair::End(_) => None, in punct_mut()
996 Some(p) => Pair::Punctuated(t, p), in new()
997 None => Pair::End(t), in new()
1005 Pair::Punctuated(t, p) => (t, Some(p)), in into_tuple()
1006 Pair::End(t) => (t, None), in into_tuple()
1013 impl<T, P> Clone for Pair<T, P> implementation
1020 Pair::Punctuated(t, p) => Pair::Punctuated(t.clone(), p.clone()), in clone()
1021 Pair::End(t) => Pair::End(t.clone()), in clone()
1072 impl<T, P> ToTokens for Pair<T, P> implementation
1079 Pair::Punctuated(a, b) => { in to_tokens()
1083 Pair::End(a) => a.to_tokens(tokens), in to_tokens()