Struct liquid_interpreter::InterruptState
source · pub struct InterruptState { /* private fields */ }
Expand description
The current interrupt state. The interrupt state is used by
the break
and continue
tags to halt template rendering
at a given point and unwind the render
call stack until
it reaches an enclosing for_loop
. At that point the interrupt
is cleared, and the for_loop
carries on processing as directed.
Implementations§
source§impl InterruptState
impl InterruptState
sourcepub fn interrupted(&self) -> bool
pub fn interrupted(&self) -> bool
An interrupt state is active.
sourcepub fn set_interrupt(&mut self, interrupt: Interrupt)
pub fn set_interrupt(&mut self, interrupt: Interrupt)
Sets the interrupt state. Any previous state is obliterated.
sourcepub fn pop_interrupt(&mut self) -> Option<Interrupt>
pub fn pop_interrupt(&mut self) -> Option<Interrupt>
Fetches and clears the interrupt state.
Trait Implementations§
source§impl Clone for InterruptState
impl Clone for InterruptState
source§fn clone(&self) -> InterruptState
fn clone(&self) -> InterruptState
Returns a copy 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 InterruptState
impl Debug for InterruptState
source§impl Default for InterruptState
impl Default for InterruptState
source§fn default() -> InterruptState
fn default() -> InterruptState
Returns the “default value” for a type. Read more