Struct ssr_rs::Ssr [−][src]
pub struct Ssr {}
Implementations
impl Ssr
[src]
impl Ssr
[src]pub fn render_to_string(
source: &str,
entry_point: &str,
params: Option<&str>
) -> String
[src]
source: &str,
entry_point: &str,
params: Option<&str>
) -> String
Evaluates the javascript source code passed and runs the render functions. Any initial params (if needed) must be passed as JSON using serde_json.
Here an useful example of how to use initial params with the actix framework.
“enrty_point” is the variable name set from the frontend bundler used. Here an example from webpack.
Auto Trait Implementations
impl RefUnwindSafe for Ssr
impl RefUnwindSafe for Ssr
impl UnwindSafe for Ssr
impl UnwindSafe for Ssr