pub struct ValueExpr {
pub tokens: Vec<TokenTree>,
}
Expand description
Value expression, e.g. as the initializer of a Constant
.
Example input:
const CONSTANT: i32 = 5 * 302;
// ^^^^^^^
Fields§
§tokens: Vec<TokenTree>
Trait Implementations§
Source§impl ToTokens for ValueExpr
impl ToTokens for ValueExpr
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for ValueExpr
impl RefUnwindSafe for ValueExpr
impl !Send for ValueExpr
impl !Sync for ValueExpr
impl Unpin for ValueExpr
impl UnwindSafe for ValueExpr
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