pub struct Resource<R = Resource> { /* private fields */ }
Expand description
Wrapper for actix_web::Resource
Implementations§
source§impl<T> Resource<Resource<T>>
impl<T> Resource<Resource<T>>
sourcepub fn name(self, name: &str) -> Self
pub fn name(self, name: &str) -> Self
Proxy for actix_web::Resource::name
.
NOTE: This doesn’t affect spec generation.
sourcepub fn guard<G: Guard + 'static>(self, guard: G) -> Self
pub fn guard<G: Guard + 'static>(self, guard: G) -> Self
Proxy for actix_web::Resource::guard
.
NOTE: This doesn’t affect spec generation.
sourcepub fn route(self, route: Route) -> Self
pub fn route(self, route: Route) -> Self
Wrapper for actix_web::Resource::route
.
sourcepub fn app_data<U: 'static>(self, data: U) -> Self
pub fn app_data<U: 'static>(self, data: U) -> Self
Proxy for actix_web::Resource::app_data
.
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::Resource::to
.
sourcepub fn wrap<M, B>(
self,
mw: M,
) -> Resource<Resource<impl ServiceFactory<ServiceRequest, Config = (), Response = ServiceResponse<B>, Error = Error, InitError = ()>>>where
B: MessageBody,
M: Transform<T::Service, ServiceRequest, Response = ServiceResponse<B>, Error = Error, InitError = ()> + 'static,
pub fn wrap<M, B>(
self,
mw: M,
) -> Resource<Resource<impl ServiceFactory<ServiceRequest, Config = (), Response = ServiceResponse<B>, Error = Error, InitError = ()>>>where
B: MessageBody,
M: Transform<T::Service, ServiceRequest, Response = ServiceResponse<B>, Error = Error, InitError = ()> + 'static,
Proxy for actix_web::web::Resource::wrap
.
NOTE: This doesn’t affect spec generation.
sourcepub fn wrap_fn<F, R, B>(
self,
mw: F,
) -> Resource<Resource<impl ServiceFactory<ServiceRequest, Config = (), Response = ServiceResponse<B>, Error = Error, InitError = ()>>>
pub fn wrap_fn<F, R, B>( self, mw: F, ) -> Resource<Resource<impl ServiceFactory<ServiceRequest, Config = (), Response = ServiceResponse<B>, Error = Error, InitError = ()>>>
Proxy for actix_web::web::Resource::wrap_fn
.
NOTE: This doesn’t affect spec generation.
sourcepub fn default_service<F, U>(self, f: F) -> Self
pub fn default_service<F, U>(self, f: F) -> Self
Proxy for actix_web::web::Resource::default_service
.
NOTE: This doesn’t affect spec generation.
Trait Implementations§
source§impl<T> Mountable for Resource<T>
impl<T> Mountable for Resource<T>
source§fn operations(&mut self) -> BTreeMap<HttpMethod, DefaultOperationRaw>
fn operations(&mut self) -> BTreeMap<HttpMethod, DefaultOperationRaw>
Map of HTTP methods and the associated API operations.
source§fn definitions(&mut self) -> BTreeMap<String, DefaultSchemaRaw>
fn definitions(&mut self) -> BTreeMap<String, DefaultSchemaRaw>
The definitions recorded by this object.
source§fn security_definitions(&mut self) -> BTreeMap<String, SecurityScheme>
fn security_definitions(&mut self) -> BTreeMap<String, SecurityScheme>
The security definitions recorded by this object.
Auto Trait Implementations§
impl<R> Freeze for Resource<R>where
R: Freeze,
impl<R> RefUnwindSafe for Resource<R>where
R: RefUnwindSafe,
impl<R> Send for Resource<R>where
R: Send,
impl<R> Sync for Resource<R>where
R: Sync,
impl<R> Unpin for Resource<R>where
R: Unpin,
impl<R> UnwindSafe for Resource<R>where
R: UnwindSafe,
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