pub struct SwaggerUi { /* private fields */ }Expand description
Swagger UI server for serving interactive API documentation
Implementations§
Source§impl SwaggerUi
impl SwaggerUi
Sourcepub fn new(spec: OpenApiSpec, config: SwaggerConfig) -> Self
pub fn new(spec: OpenApiSpec, config: SwaggerConfig) -> Self
Create new Swagger UI server
Sourcepub fn specification(&self) -> Option<&OpenApiSpec>
pub fn specification(&self) -> Option<&OpenApiSpec>
Get the specification
Sourcepub fn config(&self) -> &SwaggerConfig
pub fn config(&self) -> &SwaggerConfig
Get the configuration
Sourcepub async fn serve(&self) -> OpenApiResult<()>
pub async fn serve(&self) -> OpenApiResult<()>
Start the Swagger UI server using axum
Source§impl SwaggerUi
impl SwaggerUi
Sourcepub fn generate_static_html(
spec: &OpenApiSpec,
config: &SwaggerConfig,
) -> OpenApiResult<String>
pub fn generate_static_html( spec: &OpenApiSpec, config: &SwaggerConfig, ) -> OpenApiResult<String>
Generate static Swagger UI HTML file
Auto Trait Implementations§
impl Freeze for SwaggerUi
impl RefUnwindSafe for SwaggerUi
impl Send for SwaggerUi
impl Sync for SwaggerUi
impl Unpin for SwaggerUi
impl UnwindSafe for SwaggerUi
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