pub struct ForDirective {
pub for_expr: ForTemplateExpr,
pub endfor_expr: EndforTemplateExpr,
/* private fields */
}
Expand description
The template for
directive is the template equivalent of the for expression, producing zero
or more copies of its sub-template based on the elements of a collection.
Fields§
§for_expr: ForTemplateExpr
The for
sub-expression within the directive.
endfor_expr: EndforTemplateExpr
The endfor
sub-expression within the directive.
Implementations§
Source§impl ForDirective
impl ForDirective
Sourcepub fn new(
for_expr: ForTemplateExpr,
endfor_expr: EndforTemplateExpr,
) -> ForDirective
pub fn new( for_expr: ForTemplateExpr, endfor_expr: EndforTemplateExpr, ) -> ForDirective
Creates a new ForDirective
from the parts for the for
and endfor
sub-expressions.
Trait Implementations§
Source§impl Clone for ForDirective
impl Clone for ForDirective
Source§fn clone(&self) -> ForDirective
fn clone(&self) -> ForDirective
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 ForDirective
impl Debug for ForDirective
Source§impl From<ForDirective> for Directive
impl From<ForDirective> for Directive
Source§fn from(value: ForDirective) -> Self
fn from(value: ForDirective) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ForDirective
impl PartialEq for ForDirective
Source§impl Span for ForDirective
impl Span for ForDirective
impl Eq for ForDirective
Auto Trait Implementations§
impl Freeze for ForDirective
impl RefUnwindSafe for ForDirective
impl Send for ForDirective
impl Sync for ForDirective
impl Unpin for ForDirective
impl UnwindSafe for ForDirective
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