pub enum TArg {
Expr(TExpr),
Pat(TPat),
Ty(TTy),
Stmts(StmtsHole),
Args(ArgsHole),
Label(LabelRef),
Absent,
}Expand description
An argument of TemplateBuilder::apply: what fills one hole of the
applied template, in its hole order.
§Examples
use lower_lang::TArg;
assert_eq!(TArg::Absent, TArg::Absent);Variants§
Expr(TExpr)
An expression for an expression hole.
Pat(TPat)
A pattern for a pattern hole.
Ty(TTy)
A type for a type hole.
Stmts(StmtsHole)
This template’s statement-list hole, forwarded.
Args(ArgsHole)
This template’s argument-list hole, forwarded.
Label(LabelRef)
A label for a label hole.
Absent
Nothing, for an optional hole.
Trait Implementations§
impl Copy for TArg
impl Eq for TArg
impl StructuralPartialEq for TArg
Auto Trait Implementations§
impl Freeze for TArg
impl RefUnwindSafe for TArg
impl Send for TArg
impl Sync for TArg
impl Unpin for TArg
impl UnsafeUnpin for TArg
impl UnwindSafe for TArg
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