Enum rubble_templates_core::template::TemplateSlice[][src]

pub enum TemplateSlice<'a> {
    Text {
        value: &'a str,
        start_position: usize,
        end_position: usize,
    },
    Code {
        value: &'a str,
        start_position: usize,
        end_position: usize,
    },
}
Expand description

A slice of template that can be returned by an iterator.

Usually used to represent a fragment of template that needs to be evaluated. Can be used for finding template parts depending on what rules are used to detect text and code or other patterns in the source file.

Variants

Text
Show fields

Fields of Text

value: &'a strstart_position: usizeend_position: usize
Code
Show fields

Fields of Code

value: &'a strstart_position: usizeend_position: usize

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.