pub struct ServiceConfig<'s>(/* private fields */);
Expand description
Wrapper type for actix_web::web::ServiceConfig
, utoipa::openapi::path::Paths
and
vec of utoipa::openapi::schema::Schema
references.
Implementations§
Source§impl<'s> ServiceConfig<'s>
impl<'s> ServiceConfig<'s>
Sourcepub fn new(conf: &'s mut ServiceConfig) -> ServiceConfig<'s>
pub fn new(conf: &'s mut ServiceConfig) -> ServiceConfig<'s>
Construct a new ServiceConfig
from given actix_web::web::ServiceConfig
.
Sourcepub fn app_data<U: 'static>(&mut self, ext: U) -> &mut Self
pub fn app_data<U: 'static>(&mut self, ext: U) -> &mut Self
Passthrough implementation for actix_web::web::ServiceConfig::app_data
.
Sourcepub fn default_service<F, U>(&mut self, f: F) -> &mut Selfwhere
F: IntoServiceFactory<U, ServiceRequest>,
U: ServiceFactory<ServiceRequest, Config = (), Response = ServiceResponse, Error = Error> + 'static,
U::InitError: Debug,
pub fn default_service<F, U>(&mut self, f: F) -> &mut Selfwhere
F: IntoServiceFactory<U, ServiceRequest>,
U: ServiceFactory<ServiceRequest, Config = (), Response = ServiceResponse, Error = Error> + 'static,
U::InitError: Debug,
Passthrough implementation for actix_web::web::ServiceConfig::default_service
.
Sourcepub fn configure<F>(&mut self, f: F) -> &mut Selfwhere
F: FnOnce(&mut ServiceConfig<'_>),
pub fn configure<F>(&mut self, f: F) -> &mut Selfwhere
F: FnOnce(&mut ServiceConfig<'_>),
Passthrough implementation for actix_web::web::ServiceConfig::configure
.
Sourcepub fn route(&mut self, path: &str, route: Route) -> &mut Self
pub fn route(&mut self, path: &str, route: Route) -> &mut Self
Passthrough implementation for actix_web::web::ServiceConfig::route
.
Sourcepub fn service<F>(&mut self, factory: F) -> &mut Selfwhere
F: HttpServiceFactory + OpenApiFactory + 'static,
pub fn service<F>(&mut self, factory: F) -> &mut Selfwhere
F: HttpServiceFactory + OpenApiFactory + 'static,
Counterpart for UtoipaApp::service
.
Sourcepub fn external_resource<N, U>(&mut self, name: N, url: U) -> &mut Self
pub fn external_resource<N, U>(&mut self, name: N, url: U) -> &mut Self
Passthrough implementation for actix_web::web::ServiceConfig::external_resource
.
Sourcepub fn map<F: FnOnce(&mut ServiceConfig) -> &mut ServiceConfig>(
&mut self,
op: F,
) -> &mut Self
pub fn map<F: FnOnce(&mut ServiceConfig) -> &mut ServiceConfig>( &mut self, op: F, ) -> &mut Self
Synonymous for UtoipaApp::map
Auto Trait Implementations§
impl<'s> !Freeze for ServiceConfig<'s>
impl<'s> !RefUnwindSafe for ServiceConfig<'s>
impl<'s> !Send for ServiceConfig<'s>
impl<'s> !Sync for ServiceConfig<'s>
impl<'s> Unpin for ServiceConfig<'s>
impl<'s> !UnwindSafe for ServiceConfig<'s>
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