pub struct Forloop {
pub key: Option<String>,
pub value: String,
pub container: Expr,
pub body: Vec<Node>,
pub empty_body: Option<Vec<Node>>,
}
Expand description
A forloop: can be over values or key/values
Fields§
§key: Option<String>
Name of the key in the loop (only when iterating on map-like objects)
value: String
Name of the local variable for the value in the loop
container: Expr
Expression being iterated on
body: Vec<Node>
What’s in the forloop itself
empty_body: Option<Vec<Node>>
The body to execute in case of an empty object
Trait Implementations§
impl StructuralPartialEq for Forloop
Auto Trait Implementations§
impl Freeze for Forloop
impl RefUnwindSafe for Forloop
impl Send for Forloop
impl Sync for Forloop
impl Unpin for Forloop
impl UnwindSafe for Forloop
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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