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
sourceimpl<'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)> where
X: Content + ?Sized,
pub fn with<X>(
self,
content: &X
) -> Section<'section, (<C as Combine>::I, <C as Combine>::J, <C as Combine>::K, &X)> where
X: Content + ?Sized,
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
Trait Implementations
sourceimpl<'section, Contents: Clone + ContentSequence> Clone for Section<'section, Contents>
impl<'section, Contents: Clone + ContentSequence> Clone for Section<'section, Contents>
impl<'section, Contents: Copy + ContentSequence> Copy for Section<'section, Contents>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more