Lines Matching refs:Pair
208 pub fn pop(&mut self) -> Option<Pair<T, P>> { in pop()
210 self.last.take().map(|t| Pair::End(*t)) in pop()
212 self.inner.pop().map(|(t, p)| Pair::Punctuated(t, p)) in pop()
479 impl<T, P> FromIterator<Pair<T, P>> for Punctuated<T, P> {
480 fn from_iter<I: IntoIterator<Item = Pair<T, P>>>(i: I) -> Self { in from_iter()
487 impl<T, P> Extend<Pair<T, P>> for Punctuated<T, P>
491 fn extend<I: IntoIterator<Item = Pair<T, P>>>(&mut self, i: I) { in extend()
501 I: Iterator<Item = Pair<T, P>>, in do_extend()
509 Pair::Punctuated(a, b) => punctuated.inner.push((a, b)), in do_extend()
510 Pair::End(a) => { in do_extend()
568 type Item = Pair<&'a T, &'a P>;
573 .map(|(t, p)| Pair::Punctuated(t, p)) in next()
574 .or_else(|| self.last.next().map(Pair::End)) in next()
586 .map(Pair::End) in next_back()
587 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
618 type Item = Pair<&'a mut T, &'a mut P>;
623 .map(|(t, p)| Pair::Punctuated(t, p)) in next()
624 .or_else(|| self.last.next().map(Pair::End)) in next()
636 .map(Pair::End) in next_back()
637 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
658 type Item = Pair<T, P>;
663 .map(|(t, p)| Pair::Punctuated(t, p)) in next()
664 .or_else(|| self.last.next().map(Pair::End)) in next()
676 .map(Pair::End) in next_back()
677 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
953 pub enum Pair<T, P> { enum
958 impl<T, P> Pair<T, P> { impl
963 Pair::Punctuated(t, _) | Pair::End(t) => t, in into_value()
970 Pair::Punctuated(t, _) | Pair::End(t) => t, in value()
977 Pair::Punctuated(t, _) | Pair::End(t) => t, in value_mut()
985 Pair::Punctuated(_, p) => Some(p), in punct()
986 Pair::End(_) => None, in punct()
1010 Pair::Punctuated(_, p) => Some(p), in punct_mut()
1011 Pair::End(_) => None, in punct_mut()
1019 Some(p) => Pair::Punctuated(t, p), in new()
1020 None => Pair::End(t), in new()
1028 Pair::Punctuated(t, p) => (t, Some(p)), in into_tuple()
1029 Pair::End(t) => (t, None), in into_tuple()
1036 impl<T, P> Pair<&T, &P> { implementation
1037 pub fn cloned(self) -> Pair<T, P> in cloned()
1043 Pair::Punctuated(t, p) => Pair::Punctuated(t.clone(), p.clone()), in cloned()
1044 Pair::End(t) => Pair::End(t.clone()), in cloned()
1051 impl<T, P> Clone for Pair<T, P> implementation
1058 Pair::Punctuated(t, p) => Pair::Punctuated(t.clone(), p.clone()), in clone()
1059 Pair::End(t) => Pair::End(t.clone()), in clone()
1066 impl<T, P> Copy for Pair<T, P> implementation
1126 use crate::punctuated::{Pair, Punctuated};
1142 impl<T, P> ToTokens for Pair<T, P> implementation
1149 Pair::Punctuated(a, b) => { in to_tokens()
1153 Pair::End(a) => a.to_tokens(tokens), in to_tokens()