pub struct LexerOptions {
pub trim_blocks: bool,
pub lstrip_blocks: bool,
pub tags: Option<Tags>,
}Expand description
Options controlling whitespace behavior and delimiters during lexing.
Mirrors the Nunjucks trimBlocks, lstripBlocks, and tags configuration keys.
Fields§
§trim_blocks: boolWhen true, the first newline after a {% … %} tag is stripped.
lstrip_blocks: boolWhen true, leading whitespace and tabs on a line are stripped up to a {% … %} tag or {# … #} comment
(only when the tag/comment is the first non-whitespace on that line).
Custom delimiter strings. None uses the Nunjucks defaults ({%, %}, {{, }}, {#, #}).
Trait Implementations§
Source§impl Clone for LexerOptions
impl Clone for LexerOptions
Source§fn clone(&self) -> LexerOptions
fn clone(&self) -> LexerOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LexerOptions
impl Debug for LexerOptions
Source§impl Default for LexerOptions
impl Default for LexerOptions
Source§fn default() -> LexerOptions
fn default() -> LexerOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LexerOptions
impl RefUnwindSafe for LexerOptions
impl Send for LexerOptions
impl Sync for LexerOptions
impl Unpin for LexerOptions
impl UnwindSafe for LexerOptions
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