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 Contents 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