pub struct FluentHandlebars<L: Loader + Send + Sync> { /* private fields */ }Expand description
A lightweight newtype wrapper around FluentLoader that implements the HelperDef trait in a different way. It resolves Fluent placeables by looking them up in the data hash provided to Handlebars.render_template() at runtime.
Implementations§
Source§impl<L: Loader + Send + Sync> FluentHandlebars<L>
impl<L: Loader + Send + Sync> FluentHandlebars<L>
pub fn new(ldr: L) -> FluentHandlebars<L>
Trait Implementations§
Source§impl<L: Loader + Send + Sync> HelperDef for FluentHandlebars<L>
impl<L: Loader + Send + Sync> HelperDef for FluentHandlebars<L>
Source§fn call<'reg: 'rc, 'rc>(
&self,
helper: &Helper<'reg, 'rc>,
_reg: &'reg Handlebars<'_>,
context: &'rc Context,
_rcx: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output,
) -> HelperResult
fn call<'reg: 'rc, 'rc>( &self, helper: &Helper<'reg, 'rc>, _reg: &'reg Handlebars<'_>, context: &'rc Context, _rcx: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output, ) -> HelperResult
A complex version of helper interface. Read more
Source§fn call_inner<'reg, 'rc>(
&self,
_: &Helper<'reg, 'rc>,
_: &'reg Registry<'reg>,
_: &'rc Context,
_: &mut RenderContext<'reg, 'rc>,
) -> Result<ScopedJson<'reg, 'rc>, RenderError>where
'reg: 'rc,
fn call_inner<'reg, 'rc>(
&self,
_: &Helper<'reg, 'rc>,
_: &'reg Registry<'reg>,
_: &'rc Context,
_: &mut RenderContext<'reg, 'rc>,
) -> Result<ScopedJson<'reg, 'rc>, RenderError>where
'reg: 'rc,
A simplified api to define helper Read more
Auto Trait Implementations§
impl<L> Freeze for FluentHandlebars<L>where
L: Freeze,
impl<L> RefUnwindSafe for FluentHandlebars<L>where
L: RefUnwindSafe,
impl<L> Send for FluentHandlebars<L>
impl<L> Sync for FluentHandlebars<L>
impl<L> Unpin for FluentHandlebars<L>where
L: Unpin,
impl<L> UnwindSafe for FluentHandlebars<L>where
L: 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