pub struct InterpNode {
pub span: Span,
pub expr: TokenStream,
pub pipes: Vec<PipeNode>,
}Expand description
An interpolation expression: {{ expr }} or {{ expr | pipe | ... }}.
The expression is evaluated at expand time and emitted into the output token
stream, optionally transformed through a chain of PipeNodes.
Fields§
§span: SpanSource span of the {{ ... }} delimiters.
expr: TokenStreamThe expression to interpolate, e.g. name or field.ty.
pipes: Vec<PipeNode>Pipe transforms applied in order, e.g. [snake, ident:"get_{}"].
Implementations§
Trait Implementations§
Source§impl Expand for InterpNode
impl Expand for InterpNode
Source§impl From<InterpNode> for Node
impl From<InterpNode> for Node
Source§fn from(v: InterpNode) -> Self
fn from(v: InterpNode) -> Self
Converts to this type from the input type.
Source§impl Parse for InterpNode
impl Parse for InterpNode
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl Freeze for InterpNode
impl RefUnwindSafe for InterpNode
impl !Send for InterpNode
impl !Sync for InterpNode
impl Unpin for InterpNode
impl UnsafeUnpin for InterpNode
impl UnwindSafe for InterpNode
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