pub struct DocumentationController;Expand description
Serves the OpenAPI document and the Swagger UI for the service.
Mounts GET /docs (OpenAPI 3.1 JSON) and a GET /* handler for the
bundled UI assets. In production the routes are skipped unless the
documentation mode is External.
Implementations§
Source§impl DocumentationController
impl DocumentationController
Sourcepub const TEST_CLIENT_HEADER: &'static str = "X-Moovable-Test-Client"
pub const TEST_CLIENT_HEADER: &'static str = "X-Moovable-Test-Client"
Request header naming the test client to execute.
Sourcepub const TEST_PARAMS_HEADER: &'static str = "X-Moovable-Test-Params"
pub const TEST_PARAMS_HEADER: &'static str = "X-Moovable-Test-Params"
Request header carrying the JSON-encoded test parameters.
Sourcepub const SWAGGER_UI_DIR: &'static str = assets::FS_DIR
pub const SWAGGER_UI_DIR: &'static str = assets::FS_DIR
Filesystem fallback directory for the Swagger UI distribution (see assets::FS_DIR).
The same files are embedded in the binary via assets, so resolution never
depends on the process-working directory.
Sourcepub fn build_specs()
pub fn build_specs()
Builds and caches the OpenAPI document once.
Call after all controllers are mounted so every registered route is included. Later requests reuse the cached JSON string.
Trait Implementations§
Source§impl RouteController for DocumentationController
impl RouteController for DocumentationController
Source§fn register_routes<'life0, 'life1, 'async_trait>(
&'life0 self,
router: &'life1 mut Router,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_routes<'life0, 'life1, 'async_trait>(
&'life0 self,
router: &'life1 mut Router,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Registers this controller’s routes on
router, typically via RouteControllerExt.Source§fn full_path(&self, path: &str) -> String
fn full_path(&self, path: &str) -> String
Resolves a relative
path to its full mounted path including base path and version.Source§fn register<'life0, 'life1, 'async_trait>(
&'life0 self,
router: &'life1 mut Router,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register<'life0, 'life1, 'async_trait>(
&'life0 self,
router: &'life1 mut Router,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Default registration entry point; delegates to
RouteController::register_routes.fn type_name(&self) -> &'static str
Auto Trait Implementations§
impl Freeze for DocumentationController
impl RefUnwindSafe for DocumentationController
impl Send for DocumentationController
impl Sync for DocumentationController
impl Unpin for DocumentationController
impl UnsafeUnpin for DocumentationController
impl UnwindSafe for DocumentationController
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> RouteControllerExt for Twhere
T: RouteController,
impl<T> RouteControllerExt for Twhere
T: RouteController,
Source§fn mount_get<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_get<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a GET handler with no required body at
path.Source§fn mount_post<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_post<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a POST handler; requires a declared request body or file parameter.
Source§fn mount_put<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_put<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a PUT handler; requires a declared request body or file parameter.
Source§fn mount_patch<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
has_body: bool,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_patch<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
has_body: bool,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a PATCH handler;
has_body selects whether a request body is required.Source§fn mount_patch_with_body<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_patch_with_body<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a PATCH handler that requires a request body.
Source§fn mount_patch_without_body<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_patch_without_body<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a PATCH handler that requires no request body.
Source§fn mount_delete<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_delete<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a DELETE handler with no required body at
path.Source§fn mount_options<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_options<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts an OPTIONS handler with no required body at
path.Source§fn mount_head<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_head<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a HEAD handler with no required body at
path.Source§fn mount_trace<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_trace<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a TRACE handler with no required body at
path.Source§fn mount_connect<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_connect<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a CONNECT handler with no required body at
path.Source§fn mount_copy<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_copy<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV COPY handler with no required body at
path.Source§fn mount_move<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_move<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV MOVE handler with no required body at
path.Source§fn mount_lock<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_lock<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV LOCK handler; requires a declared request body or file parameter.
Source§fn mount_unlock<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_unlock<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV UNLOCK handler with no required body at
path.Source§fn mount_propfind<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_propfind<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV PROPFIND handler; requires a declared request body or file parameter.
Source§fn mount_mkcol<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_mkcol<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV MKCOL handler with no required body at
path.Source§fn mount_search<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_search<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV SEARCH handler; requires a declared request body or file parameter.
Source§fn mount_report<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_report<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV REPORT handler; requires a declared request body or file parameter.
Source§fn mount_checkin<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_checkin<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a versioning CHECKIN handler with no required body at
path.Source§fn mount_checkout<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_checkout<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a versioning CHECKOUT handler with no required body at
path.Source§fn mount_uncheckout<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_uncheckout<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a versioning UNCHECKOUT handler with no required body at
path.Source§fn mount_merge<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_merge<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV MERGE handler; requires a declared request body or file parameter.
Source§fn mount_acl<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_acl<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a WebDAV ACL handler; requires a declared request body or file parameter.
Source§fn mount_custom<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
method: Method,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
fn mount_custom<T, F, Fut>(
&self,
router: &mut Router,
path: &str,
method: Method,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
T: Serialize + Send + Sync + 'static,
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<ServiceResult<T>, ErrorResult>> + Send + 'static,
Mounts a handler for an arbitrary
method with no required body at path.Source§fn mount_static(
&self,
router: &mut Router,
path: &str,
fs_path: String,
middlewares: Vec<Middleware>,
)
fn mount_static( &self, router: &mut Router, path: &str, fs_path: String, middlewares: Vec<Middleware>, )
Serves files under
fs_path at this controller’s base path plus path.Source§fn mount_typed<F, Fut>(
&self,
router: &mut Router,
path: &str,
method: Method,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Box<dyn TypedServiceResult>, ErrorResult>> + Send + 'static,
fn mount_typed<F, Fut>(
&self,
router: &mut Router,
path: &str,
method: Method,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Box<dyn TypedServiceResult>, ErrorResult>> + Send + 'static,
Mounts a handler returning
Box<dyn TypedServiceResult> for heterogeneous payloads.Source§fn mount_get_typed<F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Box<dyn TypedServiceResult>, ErrorResult>> + Send + 'static,
fn mount_get_typed<F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Box<dyn TypedServiceResult>, ErrorResult>> + Send + 'static,
Mounts a boxed-result GET handler returning heterogeneous payloads.
Source§fn mount_post_typed<F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Box<dyn TypedServiceResult>, ErrorResult>> + Send + 'static,
fn mount_post_typed<F, Fut>(
&self,
router: &mut Router,
path: &str,
description: RouteDescription,
handler: F,
middlewares: Vec<Middleware>,
)where
F: Fn(CorrelationContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Box<dyn TypedServiceResult>, ErrorResult>> + Send + 'static,
Mounts a boxed-result POST handler returning heterogeneous payloads.