pub struct SwaggerConfig {
pub path: String,
pub title: String,
pub spec: OpenApiSpec,
}Expand description
Swagger UI configuration
Fields§
§path: StringPath where Swagger UI will be served (e.g., “/api-docs”)
title: StringTitle for the Swagger UI page
spec: OpenApiSpecOpenAPI specification
Implementations§
Source§impl SwaggerConfig
impl SwaggerConfig
Sourcepub fn new(path: impl Into<String>, spec: OpenApiSpec) -> Self
pub fn new(path: impl Into<String>, spec: OpenApiSpec) -> Self
Create a new Swagger configuration
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Set the title
Trait Implementations§
Source§impl Clone for SwaggerConfig
impl Clone for SwaggerConfig
Source§fn clone(&self) -> SwaggerConfig
fn clone(&self) -> SwaggerConfig
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 SwaggerConfig
impl RefUnwindSafe for SwaggerConfig
impl Send for SwaggerConfig
impl Sync for SwaggerConfig
impl Unpin for SwaggerConfig
impl UnsafeUnpin for SwaggerConfig
impl UnwindSafe for SwaggerConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<R, D> DepsPresent<D> for R
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging