pub struct RustApiConfig { /* private fields */ }Expand description
Configuration builder for RustAPI with auto-routes
Implementations§
Source§impl RustApiConfig
impl RustApiConfig
pub fn new() -> Self
Sourcepub fn docs_enabled(self, enabled: bool) -> Self
pub fn docs_enabled(self, enabled: bool) -> Self
Enable or disable docs (default: true)
Sourcepub fn openapi_info(
self,
title: impl Into<String>,
version: impl Into<String>,
description: Option<impl Into<String>>,
) -> Self
pub fn openapi_info( self, title: impl Into<String>, version: impl Into<String>, description: Option<impl Into<String>>, ) -> Self
Set OpenAPI info
Sourcepub fn body_limit(self, limit: usize) -> Self
pub fn body_limit(self, limit: usize) -> Self
Set body size limit
Sourcepub fn layer<L>(self, layer: L) -> Selfwhere
L: MiddlewareLayer,
pub fn layer<L>(self, layer: L) -> Selfwhere
L: MiddlewareLayer,
Add a middleware layer
Auto Trait Implementations§
impl Freeze for RustApiConfig
impl !RefUnwindSafe for RustApiConfig
impl Send for RustApiConfig
impl Sync for RustApiConfig
impl Unpin for RustApiConfig
impl !UnwindSafe for RustApiConfig
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