pub struct Route { /* private fields */ }
Expand description
Wrapper for actix_web::Route
Implementations§
source§impl Route
impl Route
sourcepub fn new() -> Route
pub fn new() -> Route
Wrapper for actix_web::Route::new
sourcepub fn method(self, method: Method) -> Self
pub fn method(self, method: Method) -> Self
Wrapper for actix_web::Route::method
sourcepub fn guard<G: Guard + 'static>(self, guard: G) -> Self
pub fn guard<G: Guard + 'static>(self, guard: G) -> Self
Proxy for actix_web::Route::guard
.
NOTE: This doesn’t affect spec generation.
sourcepub fn to<F, Args>(self, handler: F) -> Selfwhere
F: Handler<Args>,
Args: FromRequest + 'static,
F::Output: Responder + 'static,
F::Future: Apiv2Operation,
pub fn to<F, Args>(self, handler: F) -> Selfwhere
F: Handler<Args>,
Args: FromRequest + 'static,
F::Output: Responder + 'static,
F::Future: Apiv2Operation,
Wrapper for actix_web::Route::to
Trait Implementations§
source§impl ServiceFactory<ServiceRequest> for Route
impl ServiceFactory<ServiceRequest> for Route
source§type Service = <Route as ServiceFactory<ServiceRequest>>::Service
type Service = <Route as ServiceFactory<ServiceRequest>>::Service
The kind of
Service
created by this factory.source§type Future = <Route as ServiceFactory<ServiceRequest>>::Future
type Future = <Route as ServiceFactory<ServiceRequest>>::Future
The future of the
Service
instance.gsource§type Response = <<Route as ServiceFactory<ServiceRequest>>::Service as Service<ServiceRequest>>::Response
type Response = <<Route as ServiceFactory<ServiceRequest>>::Service as Service<ServiceRequest>>::Response
Responses given by the created services.
source§fn new_service(&self, cfg: Self::Config) -> Self::Future
fn new_service(&self, cfg: Self::Config) -> Self::Future
Create and return a new service asynchronously.
Auto Trait Implementations§
impl Freeze for Route
impl !RefUnwindSafe for Route
impl !Send for Route
impl !Sync for Route
impl Unpin for Route
impl !UnwindSafe for Route
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<SF, Req> IntoServiceFactory<SF, Req> for SFwhere
SF: ServiceFactory<Req>,
impl<SF, Req> IntoServiceFactory<SF, Req> for SFwhere
SF: ServiceFactory<Req>,
§fn into_factory(self) -> SF
fn into_factory(self) -> SF
Convert
Self
to a ServiceFactory
§impl<SF, Req> ServiceFactoryExt<Req> for SFwhere
SF: ServiceFactory<Req>,
impl<SF, Req> ServiceFactoryExt<Req> for SFwhere
SF: ServiceFactory<Req>,
§fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, Req, R>
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, Req, R>
Map this service’s output to a different type, returning a new service
of the resulting type.
§fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, Req, F, E>
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, Req, F, E>
Map this service’s error to a different error, returning a new service.
§fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, Req, E>
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, Req, E>
Map this factory’s init error to a different error, returning a new service.