makepad_micro_proc_macro::macro_lib

Struct TokenBuilder

Source
pub struct TokenBuilder {
    pub groups: Vec<(Delimiter, TokenStream)>,
}

Fields§

§groups: Vec<(Delimiter, TokenStream)>

Implementations§

Source§

impl TokenBuilder

Source

pub fn new() -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn end(self) -> TokenStream

Source

pub fn eprint(&self)

Source

pub fn extend(&mut self, tt: TokenTree) -> &mut Self

Source

pub fn stream(&mut self, what: Option<TokenStream>) -> &mut Self

Source

pub fn add(&mut self, what: &str) -> &mut Self

Source

pub fn ident(&mut self, id: &str) -> &mut Self

Source

pub fn ident_with_span(&mut self, id: &str, span: Span) -> &mut Self

Source

pub fn punct(&mut self, s: &str) -> &mut Self

Source

pub fn lifetime_mark(&mut self) -> &mut Self

Source

pub fn sep(&mut self) -> &mut Self

Source

pub fn string(&mut self, val: &str) -> &mut Self

Source

pub fn unsuf_usize(&mut self, val: usize) -> &mut Self

Source

pub fn suf_u16(&mut self, val: u16) -> &mut Self

Source

pub fn suf_u32(&mut self, val: u32) -> &mut Self

Source

pub fn suf_u64(&mut self, val: u64) -> &mut Self

Source

pub fn unsuf_f32(&mut self, val: f32) -> &mut Self

Source

pub fn unsuf_f64(&mut self, val: f64) -> &mut Self

Source

pub fn unsuf_i64(&mut self, val: i64) -> &mut Self

Source

pub fn chr(&mut self, val: char) -> &mut Self

Source

pub fn _lit(&mut self, lit: Literal) -> &mut Self

Source

pub fn push_group(&mut self, delim: Delimiter) -> &mut Self

Source

pub fn stack_as_string(&self) -> String

Source

pub fn pop_group(&mut self, delim: Delimiter) -> &mut Self

Trait Implementations§

Source§

impl Default for TokenBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.