pub struct HandlebarsParser;Expand description
Parser for handlebars-style template syntax.
Implementations§
Source§impl HandlebarsParser
impl HandlebarsParser
Sourcepub fn parse(&self, text: &str) -> Result<Vec<WebUIFragment>>
pub fn parse(&self, text: &str) -> Result<Vec<WebUIFragment>>
Parse handlebars expressions from text, handling edge cases with triple/double brace disambiguation.
Rules for consecutive opening braces (N) without matching }}}:
- N >= 5: first (N-2) braces are raw, remaining
{{…}}is a valid double - N == 3 or 4: entire sequence through
}}is treated as raw text
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HandlebarsParser
impl RefUnwindSafe for HandlebarsParser
impl Send for HandlebarsParser
impl Sync for HandlebarsParser
impl Unpin for HandlebarsParser
impl UnsafeUnpin for HandlebarsParser
impl UnwindSafe for HandlebarsParser
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