Struct windows_gen::TokenStream[][src]

pub struct TokenStream { /* fields omitted */ }

A stream of tokens

Implementations

impl TokenStream[src]

pub fn new() -> Self[src]

Create a new TokenStream

pub fn append(&mut self, ident: Ident)[src]

Appends an identifier to the stream

note: a space will be inserted before the identifier

pub fn combine(&mut self, other: &TokenStream)[src]

Appends another stream to the stream

note: a space will be inserted before the other stream

pub fn as_str(&self) -> &str[src]

View the stream as a string

pub fn into_string(self) -> String[src]

Convert the stream into a String

pub fn parse<T: FromStr>(self) -> Result<T, T::Err>[src]

Parse the token stream as something

Mostly used with proc_macro2::TokenStream or proc_macro::TokenStream

pub fn push(&mut self, c: char)[src]

pub fn push_str(&mut self, str: &str)[src]

Trait Implementations

impl Clone for TokenStream[src]

impl Debug for TokenStream[src]

impl Display for TokenStream[src]

impl FromIterator<TokenStream> for TokenStream[src]

impl ToTokens for TokenStream[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.