[][src]Struct ramhorns::Section

pub struct Section<'section, Contents: ContentSequence> { /* fields omitted */ }

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]

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]

Attach a Content to this section. This will keep track of a stack up to 4 Contents 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]

Render this section once to the provided Encoder.

Trait Implementations

impl<'section, Contents: Clone + ContentSequence> Clone for Section<'section, Contents>[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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.