pub struct RustApi { /* private fields */ }Expand description
Implementations§
Source§impl RustApi
impl RustApi
Sourcepub fn register_schema<T>(self) -> RustApiwhere
T: for<'a> ToSchema<'a>,
pub fn register_schema<T>(self) -> RustApiwhere
T: for<'a> ToSchema<'a>,
Sourcepub fn openapi_info(
self,
title: &str,
version: &str,
description: Option<&str>,
) -> RustApi
pub fn openapi_info( self, title: &str, version: &str, description: Option<&str>, ) -> RustApi
Configure OpenAPI info (title, version, description)
Sourcepub fn route(self, path: &str, method_router: MethodRouter) -> RustApi
pub fn route(self, path: &str, method_router: MethodRouter) -> RustApi
Sourcepub fn mount(self, path: &str, method_router: MethodRouter) -> RustApi
👎Deprecated: Use route() directly or mount_route() for macro-based routing
pub fn mount(self, path: &str, method_router: MethodRouter) -> RustApi
Mount a handler (convenience method)
Alias for .route(path, method_router) for a single handler.
Sourcepub fn mount_route(self, route: Route) -> RustApi
pub fn mount_route(self, route: Route) -> RustApi
Sourcepub fn docs_with_info(
self,
path: &str,
title: &str,
version: &str,
description: Option<&str>,
) -> RustApi
pub fn docs_with_info( self, path: &str, title: &str, version: &str, description: Option<&str>, ) -> RustApi
Sourcepub fn into_router(self) -> Router
pub fn into_router(self) -> Router
Get the inner router (for testing or advanced usage)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RustApi
impl !RefUnwindSafe for RustApi
impl Send for RustApi
impl Sync for RustApi
impl Unpin for RustApi
impl !UnwindSafe for RustApi
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