pub enum Token {
Text(String),
EscapedExpr(String),
RawExpr(String),
LiteralExpr(String),
LiteralDirective {
name: String,
args: Option<String>,
},
Directive {
name: String,
args: Option<String>,
},
ComponentOpen {
name: String,
attrs: Vec<(String, String)>,
self_closing: bool,
},
ComponentClose {
name: String,
},
}Variants§
Text(String)
Literal HTML/text content.
EscapedExpr(String)
{{ expr }} — escaped output.
RawExpr(String)
{!! expr !!} — unescaped output.
LiteralExpr(String)
@{{ expr }} — Blade-style escape: output the literal text
{{ expr }} without interpolation. Used to embed mustache syntax
in client-side templates (Vue, Alpine, Handlebars) that share Blade’s
brace conventions.
LiteralDirective
@@name or @@name(args) — Blade-style directive escape: output the
literal @name(args) text without executing the directive.
Directive
@directive(args) — Blade-style directive.
ComponentOpen
<x-name attr="val"> — component open.
ComponentClose
</x-name> — component close.
Trait Implementations§
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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