[−][src]Struct bracket::template::Template
Implementations
impl<'source> Template<'source>
[src]
pub fn new(source: &'source str, node: Node<'source>) -> Self
[src]
pub fn as_str(&self) -> &'source str
[src]
pub fn node(&self) -> &'source Node<'_>
[src]
impl<'reg, 'source> Template<'source>
[src]
pub fn compile(
source: &'source str,
options: ParserOptions
) -> SyntaxResult<Template<'_>>
[src]
source: &'source str,
options: ParserOptions
) -> SyntaxResult<Template<'_>>
Compile a block.
pub fn render<T>(
&self,
escape: &EscapeFn,
helpers: &'reg HelperRegistry<'reg>,
templates: &'source Templates<'source>,
name: &str,
data: &T,
writer: &mut impl Output
) -> RenderResult<()> where
T: Serialize,
[src]
&self,
escape: &EscapeFn,
helpers: &'reg HelperRegistry<'reg>,
templates: &'source Templates<'source>,
name: &str,
data: &T,
writer: &mut impl Output
) -> RenderResult<()> where
T: Serialize,
Render this template to the given writer.
Trait Implementations
Auto Trait Implementations
impl<'source> RefUnwindSafe for Template<'source>
impl<'source> Send for Template<'source>
impl<'source> Sync for Template<'source>
impl<'source> Unpin for Template<'source>
impl<'source> UnwindSafe for Template<'source>
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,