Struct rubble_templates_evaluators::simple::template::Template [−][src]
A simple template that represents a source text.
This template is a raw template that can be reused with different variables or Evaluators. It contains a raw source that can be parsed.
Fields
raw_content: String
Implementations
impl Template
[src]
pub fn read_from(path: &Path) -> Result<Template, Error>
[src]
pub fn from(raw_content: String) -> Template
[src]
Trait Implementations
impl<'a, E> Compiler<&'a Template> for TemplateCompiler<E> where
E: Evaluator,
[src]
E: Evaluator,
type Item = TemplateSlice<'a>
Type of a single template part that can be compiled/evaluated/parsed. Read more
type ItemIterator = EvaluableMixedContentIterator<'a, Template>
Iterator that can provide template parts that need to be compiled.
fn compile<C>(
&self,
content: C,
context: Context
) -> Result<String, CompilationError> where
C: EvaluableMixedContent<Item = Self::Item, IntoIter = Self::ItemIterator>,
[src]
&self,
content: C,
context: Context
) -> Result<String, CompilationError> where
C: EvaluableMixedContent<Item = Self::Item, IntoIter = Self::ItemIterator>,
impl Debug for Template
[src]
impl Eq for Template
[src]
impl<'a> EvaluableMixedContent for &'a Template
[src]
impl<'a> IntoIterator for &'a Template
[src]
type Item = TemplateSlice<'a>
The type of the elements being iterated over.
type IntoIter = EvaluableMixedContentIterator<'a, Template>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl PartialEq<Template> for Template
[src]
impl StructuralEq for Template
[src]
impl StructuralPartialEq for Template
[src]
Auto Trait Implementations
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
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,
pub 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, 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.
pub 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>,