pub enum Arg {
ExprCast(ExprCast),
Expr(Expr),
}Expand description
An argument to a pw_format backed macro.
pw_format backed macros have special case recognition of type casts
(value as ty) in order to annotate a type for typeless printing w/o
relying on experimental features. If an argument is given in that form,
it will be represented as an Arg::ExprCast here. Otherwise it will
be an Arg::Expr.
Variants§
ExprCast(ExprCast)
An argument that is an type cast expression.
Expr(Expr)
An argument that is an expression.
Trait Implementations§
Source§impl ToTokens for Arg
impl ToTokens for Arg
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 Arg
impl RefUnwindSafe for Arg
impl !Send for Arg
impl !Sync for Arg
impl Unpin for Arg
impl UnsafeUnpin for Arg
impl UnwindSafe for Arg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.