Struct rune::TokenStream [−][src]
A token stream.
Implementations
impl TokenStream
[src]
pub fn new() -> Self
[src]
Construct an empty token stream for testing.
pub fn from_to_tokens<T>(tokens: T) -> Self where
T: ToTokens,
[src]
T: ToTokens,
pub fn push(&mut self, token: Token)
[src]
Push the current token to the stream.
pub fn extend<I>(&mut self, tokens: I) where
I: IntoIterator,
Token: From<I::Item>,
[src]
I: IntoIterator,
Token: From<I::Item>,
Extend the token stream with another iterator.
pub fn kinds(&self) -> Kinds<'_>
[src]
Return something that once formatted will produce a stream of kinds.
Trait Implementations
impl Clone for TokenStream
[src]
fn clone(&self) -> TokenStream
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TokenStream
[src]
impl Default for TokenStream
[src]
fn default() -> TokenStream
[src]
impl Eq for TokenStream
[src]
impl From<Vec<Token, Global>> for TokenStream
[src]
impl<'a> IntoIterator for &'a TokenStream
[src]
type Item = &'a Token
The type of the elements being iterated over.
type IntoIter = Iter<'a, Token>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl IntoIterator for TokenStream
[src]
type Item = Token
The type of the elements being iterated over.
type IntoIter = IntoIter<Token>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl OptionSpanned for TokenStream
[src]
fn option_span(&self) -> Option<Span>
[src]
impl PartialEq<TokenStream> for TokenStream
[src]
fn eq(&self, other: &TokenStream) -> bool
[src]
fn ne(&self, other: &TokenStream) -> bool
[src]
impl PartialEq<Vec<Token, Global>> for TokenStream
[src]
fn eq(&self, other: &Vec<Token>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for TokenStream
[src]
impl StructuralPartialEq for TokenStream
[src]
impl ToTokens for TokenStream
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for TokenStream
impl Send for TokenStream
impl Sync for TokenStream
impl Unpin for TokenStream
impl UnwindSafe for TokenStream
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,