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 RefUnwindSafe for Arg
impl !Send for Arg
impl !Sync for Arg
impl Unpin 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> 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.