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