pub struct FluentLoader<L> { /* private fields */ }
Expand description
A Loader
agnostic container type with optional trait implementations
for integrating with different libraries.
Implementations§
Source§impl<L> FluentLoader<L>
impl<L> FluentLoader<L>
Sourcepub fn with_default_lang(self, lang: LanguageIdentifier) -> Self
pub fn with_default_lang(self, lang: LanguageIdentifier) -> Self
Set default language for this FluentLoader
.
Template engines can use this value when rendering translations.
So far this feature is only implemented for Tera.
Trait Implementations§
Source§impl<L: Loader + Send + Sync> HelperDef for FluentLoader<L>
impl<L: Loader + Send + Sync> HelperDef for FluentLoader<L>
Source§fn call<'reg: 'rc, 'rc>(
&self,
h: &Helper<'rc>,
reg: &'reg Handlebars<'_>,
context: &'rc Context,
rcx: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output,
) -> HelperResult
fn call<'reg: 'rc, 'rc>( &self, h: &Helper<'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<'rc>,
_: &'reg Registry<'reg>,
_: &'rc Context,
_: &mut RenderContext<'reg, 'rc>,
) -> Result<ScopedJson<'rc>, RenderError>where
'reg: 'rc,
fn call_inner<'reg, 'rc>(
&self,
_: &Helper<'rc>,
_: &'reg Registry<'reg>,
_: &'rc Context,
_: &mut RenderContext<'reg, 'rc>,
) -> Result<ScopedJson<'rc>, RenderError>where
'reg: 'rc,
A simplified api to define helper Read more
Auto Trait Implementations§
impl<L> Freeze for FluentLoader<L>where
L: Freeze,
impl<L> RefUnwindSafe for FluentLoader<L>where
L: RefUnwindSafe,
impl<L> Send for FluentLoader<L>where
L: Send,
impl<L> Sync for FluentLoader<L>where
L: Sync,
impl<L> Unpin for FluentLoader<L>where
L: Unpin,
impl<L> UnwindSafe for FluentLoader<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