pub struct Punctuated<T, P> { /* private fields */ }Expand description
Match a list of T’s separated by P’s. Possible to allow trailing P’s
Implementations§
Source§impl<T, P> Punctuated<T, P>
impl<T, P> Punctuated<T, P>
pub const fn new(item: T, punct: P) -> Punctuated<T, P>
pub const fn with_trailing(self, trailing: bool) -> Punctuated<T, P>
Trait Implementations§
Source§impl<T: Clone, P: Clone> Clone for Punctuated<T, P>
impl<T: Clone, P: Clone> Clone for Punctuated<T, P>
Source§fn clone(&self) -> Punctuated<T, P>
fn clone(&self) -> Punctuated<T, P>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Default, P: Default> Default for Punctuated<T, P>
impl<T: Default, P: Default> Default for Punctuated<T, P>
Source§fn default() -> Punctuated<T, P>
fn default() -> Punctuated<T, P>
Returns the “default value” for a type. Read more
Source§impl<T, P> Tokenizer for Punctuated<T, P>
impl<T, P> Tokenizer for Punctuated<T, P>
type Token<'a> = Item<Vec<<T as Tokenizer>::Token<'a>>>
fn to_token<'a>( &self, reader: &mut Reader<'_, 'a>, ) -> Result<Self::Token<'a>, Error>
fn eat(&self, reader: &mut Reader<'_, '_>) -> Result<(), Error>
fn peek(&self, reader: &mut Reader<'_, '_>) -> Result<bool, Error>
impl<T: Copy, P: Copy> Copy for Punctuated<T, P>
Auto Trait Implementations§
impl<T, P> Freeze for Punctuated<T, P>
impl<T, P> RefUnwindSafe for Punctuated<T, P>where
T: RefUnwindSafe,
P: RefUnwindSafe,
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> UnwindSafe for Punctuated<T, P>where
T: UnwindSafe,
P: UnwindSafe,
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