[][src]Struct ssr::SsrConfig

pub struct SsrConfig {
    pub port: u16,
    pub js_worker: PathBuf,
    pub global_js_renderer: Option<PathBuf>,
}

A global configuration for Ssr instance.

Fields

port: u16

A port that Node.js worker will be listening on.

js_worker: PathBuf

Path to Node.js worker installed from npm. It should be relative to the std::env::current_dir.

global_js_renderer: Option<PathBuf>

If your web app is a SPA (Single Page Application), then you should have a single entry point for all rendering requests. If it's the case, provide a path to this file here and it will be used by the worker to render all responses. Another option is to provide a JS renderer per request but keep in mind that it would introduce additional runtime overhead since JS module has to be required during a request as opposed to requiring it once on application startup.

Auto Trait Implementations

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,