pub struct Section<'section, Contents>where
    Contents: ContentSequence,{ /* private fields */ }Expand description
A section of a Template that can be rendered individually, usually delimited by
{{#section}} ... {{/section}} tags.
Implementations§
source§impl<'section, C> Section<'section, C>where
    C: ContentSequence,
 
impl<'section, C> Section<'section, C>where
    C: ContentSequence,
sourcepub fn with<X>(
    self,
    content: &X
) -> Section<'section, (<C as Combine>::I, <C as Combine>::J, <C as Combine>::K, &X)>
 
pub fn with<X>( self, content: &X ) -> Section<'section, (<C as Combine>::I, <C as Combine>::J, <C as Combine>::K, &X)>
Attach a Content to this section. This will keep track of a stack up to
4 Contents deep, cycling on overflow.
sourcepub fn without_last(self) -> Section<'section, <C as Combine>::Previous>
 
pub fn without_last(self) -> Section<'section, <C as Combine>::Previous>
The section without the last Content in the stack
Trait Implementations§
source§impl<'section, Contents> Clone for Section<'section, Contents>where
    Contents: Clone + ContentSequence,
 
impl<'section, Contents> Clone for Section<'section, Contents>where
    Contents: Clone + ContentSequence,
impl<'section, Contents> Copy for Section<'section, Contents>where
    Contents: Copy + ContentSequence,
Auto Trait Implementations§
impl<'section, Contents> Freeze for Section<'section, Contents>
impl<'section, Contents> RefUnwindSafe for Section<'section, Contents>
impl<'section, Contents> Send for Section<'section, Contents>
impl<'section, Contents> Sync for Section<'section, Contents>
impl<'section, Contents> Unpin for Section<'section, Contents>
impl<'section, Contents> UnwindSafe for Section<'section, Contents>
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