pub enum TilePiece {
Static(String),
Hole(TileHole),
Projection {
source: ForSource,
sep: Option<String>,
body: Vec<TilePiece>,
span: Span,
},
Branch {
cond: Expr,
then: Vec<TilePiece>,
otherwise: Option<Vec<TilePiece>>,
span: Span,
},
}Expand description
One element of a parsed template.
Variants§
Static(String)
Bytes copied as written.
Hole(TileHole)
${expr : type | format !}.
Projection
@for <source> [sep "..."] { body }.
Fields
Branch
@if cond { body } [@else { body }].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TilePiece
impl RefUnwindSafe for TilePiece
impl Send for TilePiece
impl Sync for TilePiece
impl Unpin for TilePiece
impl UnsafeUnpin for TilePiece
impl UnwindSafe for TilePiece
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