[−][src]Struct ramhorns::Section
A section of a Template
that can be rendered individually, usually delimited by
{{#section}} ... {{/section}}
tags.
Implementations
impl<'section, C> Section<'section, C> where
C: ContentSequence,
[src]
C: ContentSequence,
pub fn with<X: ?Sized>(
self,
content: &X
) -> Section<'section, (<C as Combine>::I, <C as Combine>::J, <C as Combine>::K, &X)> where
X: Content,
[src]
self,
content: &X
) -> Section<'section, (<C as Combine>::I, <C as Combine>::J, <C as Combine>::K, &X)> where
X: Content,
Attach a Content
to this section. This will keep track of a stack up to
4 Content
s deep, cycling on overflow.
pub fn without_last(self) -> Section<'section, C::Previous>
[src]
The section without the last Content
in the stack
pub fn render<E>(&self, encoder: &mut E) -> Result<(), E::Error> where
E: Encoder,
[src]
E: Encoder,
Render this section once to the provided Encoder
.
Trait Implementations
impl<'section, Contents: Clone + ContentSequence> Clone for Section<'section, Contents>
[src]
fn clone(&self) -> Section<'section, Contents>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'section, Contents: Copy + ContentSequence> Copy for Section<'section, Contents>
[src]
Auto Trait Implementations
impl<'section, Contents> RefUnwindSafe for Section<'section, Contents> where
Contents: RefUnwindSafe,
Contents: RefUnwindSafe,
impl<'section, Contents> Send for Section<'section, Contents> where
Contents: Send,
Contents: Send,
impl<'section, Contents> Sync for Section<'section, Contents> where
Contents: Sync,
Contents: Sync,
impl<'section, Contents> Unpin for Section<'section, Contents> where
Contents: Unpin,
Contents: Unpin,
impl<'section, Contents> UnwindSafe for Section<'section, Contents> where
Contents: UnwindSafe,
Contents: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,