Struct tower_livereload::LiveReloadLayer
source · pub struct LiveReloadLayer { /* private fields */ }Expand description
Layer to apply LiveReload middleware.
Implementations§
source§impl LiveReloadLayer
impl LiveReloadLayer
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new LiveReloadLayer with the default prefix for our own
assets.
The default prefix is deliberately long and specific to avoid any accidental collisions with the wrapped service.
sourcepub fn with_custom_prefix<P: Into<String>>(prefix: P) -> Self
pub fn with_custom_prefix<P: Into<String>>(prefix: P) -> Self
Create a new LiveReloadLayer with a custom prefix.
sourcepub fn reloader(&self) -> Reloader
pub fn reloader(&self) -> Reloader
Return a manual Reloader trigger for the given LiveReloadLayer.
Trait Implementations§
source§impl Clone for LiveReloadLayer
impl Clone for LiveReloadLayer
source§fn clone(&self) -> LiveReloadLayer
fn clone(&self) -> LiveReloadLayer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more