pub struct Render<'a, P> { /* private fields */ }Expand description
The result of calling Template::render.
The template can be converted to text either using the fmt::Display implementation of Render, or by calling Render::write with an instance of Write.
Implementations§
Source§impl<'a, P> Render<'a, P>
impl<'a, P> Render<'a, P>
Sourcepub fn with_props<U>(self, props: U) -> Render<'a, U>
pub fn with_props<U>(self, props: U) -> Render<'a, U>
Set the properties to interpolate.
Sourcepub fn as_literal(&self) -> Option<&Str<'a>>
pub fn as_literal(&self) -> Option<&Str<'a>>
Try get the value of the template as a string literal.
Trait Implementations§
Source§impl<'k, P> Serialize for Render<'k, P>where
P: Props,
Available on crate feature serde only.
impl<'k, P> Serialize for Render<'k, P>where
P: Props,
Available on crate feature
serde only.Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<'k, P> Value for Render<'k, P>where
P: Props,
Available on crate feature sval only.
impl<'k, P> Value for Render<'k, P>where
P: Props,
Available on crate feature
sval only.Source§fn stream<'sval, S>(&'sval self, stream: &mut S) -> Result<(), Error>
fn stream<'sval, S>(&'sval self, stream: &mut S) -> Result<(), Error>
Stream this value through a
Stream.Source§fn to_f32(&self) -> Option<f32>
fn to_f32(&self) -> Option<f32>
Try convert this value into a 32bit binary floating point number.
Auto Trait Implementations§
impl<'a, P> Freeze for Render<'a, P>where
P: Freeze,
impl<'a, P> RefUnwindSafe for Render<'a, P>where
P: RefUnwindSafe,
impl<'a, P> Send for Render<'a, P>where
P: Send,
impl<'a, P> Sync for Render<'a, P>where
P: Sync,
impl<'a, P> Unpin for Render<'a, P>where
P: Unpin,
impl<'a, P> UnwindSafe for Render<'a, P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more