pub struct AppService { /* private fields */ }Expand description
Application configuration
Implementations§
Source§impl AppService
impl AppService
Sourcepub fn default_service(
&self,
) -> Rc<BoxServiceFactory<(), ServiceRequest, ServiceResponse<BoxBody>, Error, ()>>
pub fn default_service( &self, ) -> Rc<BoxServiceFactory<(), ServiceRequest, ServiceResponse<BoxBody>, Error, ()>>
Returns default handler factory.
Sourcepub fn register_service<F, S>(
&mut self,
rdef: ResourceDef,
guards: Option<Vec<Box<dyn Guard>>>,
factory: F,
nested: Option<Rc<ResourceMap>>,
)where
F: IntoServiceFactory<S, ServiceRequest>,
S: ServiceFactory<ServiceRequest, Response = ServiceResponse, Error = Error, Config = (), InitError = ()> + 'static,
pub fn register_service<F, S>(
&mut self,
rdef: ResourceDef,
guards: Option<Vec<Box<dyn Guard>>>,
factory: F,
nested: Option<Rc<ResourceMap>>,
)where
F: IntoServiceFactory<S, ServiceRequest>,
S: ServiceFactory<ServiceRequest, Response = ServiceResponse, Error = Error, Config = (), InitError = ()> + 'static,
Register HTTP service.
Auto Trait Implementations§
impl !RefUnwindSafe for AppService
impl !Send for AppService
impl !Sync for AppService
impl !UnwindSafe for AppService
impl Forget for AppService
impl Freeze for AppServicewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const RcInner<BoxServiceFactory<(), ServiceRequest, ServiceResponse, Error, ()>> is !null: Freeze,
PhantomData<RcInner<BoxServiceFactory<(), ServiceRequest, ServiceResponse, Error, ()>>>: Freeze,
PhantomData<(ResourceDef, BoxServiceFactory<(), ServiceRequest, ServiceResponse, Error, ()>, Option<Vec<Box<dyn Guard>>>, Option<Rc<ResourceMap>>)>: Freeze,
impl Move for AppService
impl Unpin for AppServicewhere
*const u8 is !null: Unpin,
Rc<BoxServiceFactory<(), ServiceRequest, ServiceResponse, Error, ()>>: Unpin,
Arc<RegexI>: Unpin,
Box<Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Sync + Send>>>: Unpin,
Arc<str>: Unpin,
&'static str: Unpin,
Arc<[String]>: Unpin,
Box<dyn ServiceFactory<ServiceRequest, Future = Pin<Box<dyn Future<Output = Result<Box<dyn Service<ServiceRequest, Error = Error, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse, Error>>>>, Response = ServiceResponse>>, ()>>>>, InitError = (), Config = (), Response = ServiceResponse, Service = Box<dyn Service<ServiceRequest, Error = Error, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse, Error>>>>, Response = ServiceResponse>>, Error = Error>>: Unpin,
Box<dyn Guard>: Unpin,
Rc<ResourceMap>: Unpin,
impl UnsafeUnpin for AppServicewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RcInner<BoxServiceFactory<(), ServiceRequest, ServiceResponse, Error, ()>> is !null: UnsafeUnpin,
PhantomData<RcInner<BoxServiceFactory<(), ServiceRequest, ServiceResponse, Error, ()>>>: UnsafeUnpin,
PhantomData<(ResourceDef, BoxServiceFactory<(), ServiceRequest, ServiceResponse, Error, ()>, Option<Vec<Box<dyn Guard>>>, Option<Rc<ResourceMap>>)>: UnsafeUnpin,
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