pub struct PipeNode {
pub span: Span,
pub name: Ident,
pub args: Vec<TokenStream>,
}Expand description
A single pipe stage in a {{ expr | pipe }} interpolation.
At expand time, the name is matched against the built-in pipe list. Unrecognised names are assumed to be custom pipe structs and are PascalCase-converted.
{{ name | snake }} → PipeNode { name: "snake", args: [] }
{{ name | ident:"get_{}" }} → PipeNode { name: "ident", args: ["get_{}"] }Fields§
§span: SpanSource span of the pipe name.
name: IdentThe pipe name as written, e.g. snake, ident, my_custom_pipe.
args: Vec<TokenStream>Colon-separated arguments following the name.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PipeNode
impl RefUnwindSafe for PipeNode
impl !Send for PipeNode
impl !Sync for PipeNode
impl Unpin for PipeNode
impl UnsafeUnpin for PipeNode
impl UnwindSafe for PipeNode
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