Struct ssr_rs::Ssr[][src]

pub struct Ssr {}

Implementations

impl Ssr[src]

pub fn render_to_string(
    source: &str,
    entry_point: &str,
    params: Option<&str>
) -> String
[src]

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 Send for Ssr

impl Sync for Ssr

impl Unpin for Ssr

impl UnwindSafe for Ssr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.