pub struct Section<'section, 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 Content
s deep, cycling on overflow.
sourcepub fn without_last(self) -> Section<'section, C::Previous>
pub fn without_last(self) -> Section<'section, C::Previous>
The section without the last Content
in the stack
sourcepub fn without_first(self) -> Self
pub fn without_first(self) -> Self
The section without the first Block
in the stack.
Trait Implementations§
impl<'section, Contents: Copy + ContentSequence> Copy for Section<'section, Contents>
Auto Trait Implementations§
impl<'section, Contents> Freeze for Section<'section, Contents>where
Contents: Freeze,
impl<'section, Contents> RefUnwindSafe for Section<'section, Contents>where
Contents: RefUnwindSafe,
impl<'section, Contents> Send for Section<'section, Contents>where
Contents: Send,
impl<'section, Contents> Sync for Section<'section, Contents>where
Contents: Sync,
impl<'section, Contents> Unpin for Section<'section, Contents>where
Contents: Unpin,
impl<'section, Contents> UnwindSafe for Section<'section, Contents>where
Contents: UnwindSafe,
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