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 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 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
Source§impl PartialEq for InterruptState
impl PartialEq for InterruptState
impl Eq for InterruptState
impl StructuralPartialEq for InterruptState
Auto Trait Implementations§
impl Freeze for InterruptState
impl RefUnwindSafe for InterruptState
impl Send for InterruptState
impl Sync for InterruptState
impl Unpin for InterruptState
impl UnwindSafe for InterruptState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more