pub trait TokenStreamExt:
    Default
    + Extend<TokenTree>
    + Extend<TokenStream>
    + IntoIterator<Item = TokenTree>
    + Sized {
    // Required methods
    fn grouped(self, delimiter: Delimiter) -> Group;
    fn split_puncts(
        self,
        puncts: impl AsRef<[u8]>,
    ) -> Option<(Self, ParseIter<Self::IntoIter>)>;
    fn split_puncts_all(self, puncts: impl AsRef<[u8]>) -> Vec<Self>;
    // Provided methods
    fn push(&mut self, tt: TokenTree) -> &mut Self { ... }
    fn add(&mut self, stream: TokenStream) -> &mut Self { ... }
    fn take(&mut self) -> Self { ... }
    fn grouped_paren(self) -> Group { ... }
    fn grouped_brace(self) -> Group { ... }
    fn grouped_bracket(self) -> Group { ... }
    fn grouped_none(self) -> Group { ... }
}Required Methods§
Sourcefn grouped(self, delimiter: Delimiter) -> Group
 
fn grouped(self, delimiter: Delimiter) -> Group
Call Group::new
Sourcefn split_puncts(
    self,
    puncts: impl AsRef<[u8]>,
) -> Option<(Self, ParseIter<Self::IntoIter>)>
 
fn split_puncts( self, puncts: impl AsRef<[u8]>, ) -> Option<(Self, ParseIter<Self::IntoIter>)>
Split TokenStream with puncts
Like "+-,-+".split_puncts(",") -> ("+-", "-+")
Sourcefn split_puncts_all(self, puncts: impl AsRef<[u8]>) -> Vec<Self>
 
fn split_puncts_all(self, puncts: impl AsRef<[u8]>) -> Vec<Self>
Split all TokenStream with puncts
Like "+-,-+".split_puncts_all(",") -> "+-", "-+"
Provided Methods§
Sourcefn add(&mut self, stream: TokenStream) -> &mut Self
 
fn add(&mut self, stream: TokenStream) -> &mut Self
Extend a TokenStream
fn grouped_paren(self) -> Group
fn grouped_brace(self) -> Group
fn grouped_bracket(self) -> Group
fn grouped_none(self) -> Group
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.