mirror of https://github.com/rwf2/Rocket.git
Extend 'Engines' example to illustrate its proper use.
This commit is contained in:
parent
9c5d0912ec
commit
22442313a7
|
@ -36,9 +36,15 @@ pub(crate) trait Engine: Send + Sync + 'static {
|
|||
/// # */ unimplemented!();
|
||||
/// }
|
||||
///
|
||||
/// Template::custom(|engines: &mut Engines| {
|
||||
/// engines.tera.register_filter("my_filter", my_filter);
|
||||
/// });
|
||||
/// fn main() {
|
||||
/// rocket::ignite()
|
||||
/// // ...
|
||||
/// .attach(Template::custom(|engines: &mut Engines| {
|
||||
/// engines.tera.register_filter("my_filter", my_filter);
|
||||
/// }))
|
||||
/// // ...
|
||||
/// # ;
|
||||
/// }
|
||||
/// # }
|
||||
/// ```
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue