pub struct Punctuated<T, P> {
pub pairs: Vec<(T, P)>,
pub tail: Option<Box<T>>,
}Available on crate feature
syntax only.Expand description
A punctuated sequence of syntax tree nodes of type T separated by punctuation of type P.
Fields§
§pairs: Vec<(T, P)>(T, P) pairs of item and separator.
tail: Option<Box<T>>Trailing T not followed by a separator.
Implementations§
Trait Implementations§
Source§impl<'de, T, P> Deserialize<'de> for Punctuated<T, P>where
T: Deserialize<'de>,
P: Deserialize<'de>,
impl<'de, T, P> Deserialize<'de> for Punctuated<T, P>where
T: Deserialize<'de>,
P: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq, P: Eq> Eq for Punctuated<T, P>
Source§impl<T: Ord, P: Ord> Ord for Punctuated<T, P>
impl<T: Ord, P: Ord> Ord for Punctuated<T, P>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T: PartialOrd, P: PartialOrd> PartialOrd for Punctuated<T, P>
impl<T: PartialOrd, P: PartialOrd> PartialOrd for Punctuated<T, P>
Source§impl<T, P> Serialize for Punctuated<T, P>
impl<T, P> Serialize for Punctuated<T, P>
impl<T: PartialEq, P: PartialEq> StructuralPartialEq for Punctuated<T, P>
Source§impl<T, P, I> Syntax<I> for Punctuated<T, P>
impl<T, P, I> Syntax<I> for Punctuated<T, P>
Auto Trait Implementations§
impl<T, P> Forget for Punctuated<T, P>
impl<T, P> Freeze for Punctuated<T, P>
impl<T, P> Move for Punctuated<T, P>
impl<T, P> RefUnwindSafe for Punctuated<T, P>
impl<T, P> Send for Punctuated<T, P>
impl<T, P> Sync for Punctuated<T, P>
impl<T, P> Unpin for Punctuated<T, P>
impl<T, P> UnsafeUnpin for Punctuated<T, P>
impl<T, P> UnwindSafe for Punctuated<T, P>
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