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,
    },
}

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

Fields of Text

value: &'a strstart_position: usizeend_position: usize
Code

Fields of Code

value: &'a strstart_position: usizeend_position: usize

Trait Implementations

impl<'a> Debug for TemplateSlice<'a>[src]

impl<'a> Eq for TemplateSlice<'a>[src]

impl<'a> PartialEq<TemplateSlice<'a>> for TemplateSlice<'a>[src]

impl<'a> StructuralEq for TemplateSlice<'a>[src]

impl<'a> StructuralPartialEq for TemplateSlice<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for TemplateSlice<'a>

impl<'a> Send for TemplateSlice<'a>

impl<'a> Sync for TemplateSlice<'a>

impl<'a> Unpin for TemplateSlice<'a>

impl<'a> UnwindSafe for TemplateSlice<'a>

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, 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.