[−][src]Struct ssr::SsrConfig
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
impl RefUnwindSafe for SsrConfig
[src]
impl Send for SsrConfig
[src]
impl Sync for SsrConfig
[src]
impl Unpin for SsrConfig
[src]
impl UnwindSafe for SsrConfig
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,