pub struct LiquidRenderer { /* private fields */ }Expand description
Liquid 模板渲染器
Implementations§
Trait Implementations§
Source§impl Default for LiquidRenderer
impl Default for LiquidRenderer
Source§impl TemplateRenderer for LiquidRenderer
impl TemplateRenderer for LiquidRenderer
Source§fn register_template(&mut self, name: &str, content: &str) -> TemplateResult<()>
fn register_template(&mut self, name: &str, content: &str) -> TemplateResult<()>
注册模板
Source§fn register_template_file(
&mut self,
name: &str,
path: &Path,
) -> TemplateResult<()>
fn register_template_file( &mut self, name: &str, path: &Path, ) -> TemplateResult<()>
注册模板文件
Source§fn register_templates_from_dir(
&mut self,
dir: &Path,
extension: Option<&str>,
) -> TemplateResult<()>
fn register_templates_from_dir( &mut self, dir: &Path, extension: Option<&str>, ) -> TemplateResult<()>
从目录注册所有模板
Source§fn render_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
template_name: &'life1 str,
context: &'life2 Value,
) -> Pin<Box<dyn Future<Output = TemplateResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn render_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
template_name: &'life1 str,
context: &'life2 Value,
) -> Pin<Box<dyn Future<Output = TemplateResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
异步渲染单个模板
Auto Trait Implementations§
impl Freeze for LiquidRenderer
impl RefUnwindSafe for LiquidRenderer
impl Send for LiquidRenderer
impl Sync for LiquidRenderer
impl Unpin for LiquidRenderer
impl UnsafeUnpin for LiquidRenderer
impl UnwindSafe for LiquidRenderer
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