pub struct OpenApiService { /* private fields */ }Expand description
Precompiled /openapi.json and Scalar/Swagger UI assets.
Document generation and HTML assembly happen once during application construction, never on the request hot path.
Implementations§
Source§impl OpenApiService
impl OpenApiService
pub fn new(app: &AppDefinition, config: OpenApiConfig) -> Self
Sourcepub fn handle(
&self,
method: HttpMethod,
path: &str,
) -> Option<OpenApiAssetResponse>
pub fn handle( &self, method: HttpMethod, path: &str, ) -> Option<OpenApiAssetResponse>
Returns a precompiled response when path belongs to this service.
pub const fn config(&self) -> &OpenApiConfig
Trait Implementations§
Source§impl Clone for OpenApiService
impl Clone for OpenApiService
Source§fn clone(&self) -> OpenApiService
fn clone(&self) -> OpenApiService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OpenApiService
impl RefUnwindSafe for OpenApiService
impl Send for OpenApiService
impl Sync for OpenApiService
impl Unpin for OpenApiService
impl UnsafeUnpin for OpenApiService
impl UnwindSafe for OpenApiService
Blanket Implementations§
Source§impl<T> BackgroundExt for T
impl<T> BackgroundExt for T
fn background(self, task: BackgroundTask) -> Background<Self>
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