mirror of https://github.com/rwf2/Rocket.git
make more stuff public
This commit is contained in:
parent
460af2ebf0
commit
6f6af4f26a
|
@ -64,10 +64,10 @@ pub mod msgpack;
|
||||||
pub use msgpack::{MsgPack, MsgPackError};
|
pub use msgpack::{MsgPack, MsgPackError};
|
||||||
|
|
||||||
#[cfg(feature = "templates")]
|
#[cfg(feature = "templates")]
|
||||||
mod templates;
|
pub mod templates;
|
||||||
|
|
||||||
#[cfg(feature = "templates")]
|
#[cfg(feature = "templates")]
|
||||||
pub use templates::{Template, Context as TemplateContext};
|
pub use templates::Template;
|
||||||
|
|
||||||
#[cfg(feature = "uuid")]
|
#[cfg(feature = "uuid")]
|
||||||
mod uuid;
|
mod uuid;
|
||||||
|
|
|
@ -15,9 +15,9 @@ pub trait Engine: Send + Sync + 'static {
|
||||||
|
|
||||||
pub struct Engines {
|
pub struct Engines {
|
||||||
#[cfg(feature = "tera_templates")]
|
#[cfg(feature = "tera_templates")]
|
||||||
tera: Tera,
|
pub tera: Tera,
|
||||||
#[cfg(feature = "handlebars_templates")]
|
#[cfg(feature = "handlebars_templates")]
|
||||||
handlebars: Handlebars,
|
pub handlebars: Handlebars,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Engines {
|
impl Engines {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
extern crate handlebars;
|
pub extern crate handlebars;
|
||||||
|
|
||||||
use super::serde::Serialize;
|
use super::serde::Serialize;
|
||||||
use super::{Engine, TemplateInfo};
|
use super::{Engine, TemplateInfo};
|
||||||
|
|
|
@ -3,7 +3,16 @@ extern crate serde_json;
|
||||||
extern crate glob;
|
extern crate glob;
|
||||||
|
|
||||||
#[cfg(feature = "tera_templates")] mod tera_templates;
|
#[cfg(feature = "tera_templates")] mod tera_templates;
|
||||||
|
|
||||||
|
#[cfg(feature = "tera_templates")]
|
||||||
|
pub use self::tera_templates::{tera, Tera};
|
||||||
|
|
||||||
#[cfg(feature = "handlebars_templates")] mod handlebars_templates;
|
#[cfg(feature = "handlebars_templates")] mod handlebars_templates;
|
||||||
|
|
||||||
|
#[cfg(feature = "handlebars_templates")]
|
||||||
|
pub use self::handlebars_templates::{handlebars, Handlebars};
|
||||||
|
|
||||||
|
|
||||||
mod engine;
|
mod engine;
|
||||||
mod context;
|
mod context;
|
||||||
|
|
||||||
|
@ -23,6 +32,8 @@ use rocket::http::{ContentType, Status};
|
||||||
|
|
||||||
pub use self::context::Context;
|
pub use self::context::Context;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const DEFAULT_TEMPLATE_DIR: &'static str = "templates";
|
const DEFAULT_TEMPLATE_DIR: &'static str = "templates";
|
||||||
|
|
||||||
/// The Template type implements generic support for template rendering in
|
/// The Template type implements generic support for template rendering in
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
extern crate tera;
|
pub extern crate tera;
|
||||||
|
|
||||||
use super::serde::Serialize;
|
use super::serde::Serialize;
|
||||||
use super::{Engine, TemplateInfo};
|
use super::{Engine, TemplateInfo};
|
||||||
|
|
Loading…
Reference in New Issue