Struct tower_livereload::LiveReload
source · pub struct LiveReload<S> { /* private fields */ }Expand description
Middleware to enable LiveReload functionality.
Implementations§
source§impl<S> LiveReload<S>
impl<S> LiveReload<S>
sourcepub fn new(service: S, reloader: Reloader) -> Self
pub fn new(service: S, reloader: Reloader) -> Self
Create a new LiveReload middleware 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>>(
service: S,
reloader: Reloader,
prefix: P
) -> Self
pub fn with_custom_prefix<P: Into<String>>( service: S, reloader: Reloader, prefix: P ) -> Self
Create a new LiveReload middleware with a custom prefix.
Trait Implementations§
source§impl<S: Clone> Clone for LiveReload<S>
impl<S: Clone> Clone for LiveReload<S>
source§fn clone(&self) -> LiveReload<S>
fn clone(&self) -> LiveReload<S>
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 moresource§impl<S: Debug> Debug for LiveReload<S>
impl<S: Debug> Debug for LiveReload<S>
source§impl<ReqBody, RespBody, S> Service<Request<ReqBody>> for LiveReload<S>where
S: Service<Request<ReqBody>, Response = Response<RespBody>>,
RespBody: Body,
impl<ReqBody, RespBody, S> Service<Request<ReqBody>> for LiveReload<S>where S: Service<Request<ReqBody>, Response = Response<RespBody>>, RespBody: Body,
§type Response = <OverlayService<String, Error, OverlayService<LongPollBody, Error, InjectService<S, ContentTypeStartsWithPredicate<&'static str>>>> as Service<Request<ReqBody>>>::Response
type Response = <OverlayService<String, Error, OverlayService<LongPollBody, Error, InjectService<S, ContentTypeStartsWithPredicate<&'static str>>>> as Service<Request<ReqBody>>>::Response
Responses given by the service.
§type Error = <OverlayService<String, Error, OverlayService<LongPollBody, Error, InjectService<S, ContentTypeStartsWithPredicate<&'static str>>>> as Service<Request<ReqBody>>>::Error
type Error = <OverlayService<String, Error, OverlayService<LongPollBody, Error, InjectService<S, ContentTypeStartsWithPredicate<&'static str>>>> as Service<Request<ReqBody>>>::Error
Errors produced by the service.
§type Future = <OverlayService<String, Error, OverlayService<LongPollBody, Error, InjectService<S, ContentTypeStartsWithPredicate<&'static str>>>> as Service<Request<ReqBody>>>::Future
type Future = <OverlayService<String, Error, OverlayService<LongPollBody, Error, InjectService<S, ContentTypeStartsWithPredicate<&'static str>>>> as Service<Request<ReqBody>>>::Future
The future response value.