pub struct SwaggerConfig {
pub host: String,
pub port: u16,
pub title: String,
pub custom_css: Option<String>,
pub custom_js: Option<String>,
pub oauth: Option<OAuthConfig>,
}Expand description
Configuration for Swagger UI
Fields§
§host: StringServer host
port: u16Server port
title: StringPage title
custom_css: Option<String>Custom CSS
custom_js: Option<String>Custom JavaScript
oauth: Option<OAuthConfig>OAuth configuration
Implementations§
Source§impl SwaggerConfig
impl SwaggerConfig
Sourcepub fn with_server(self, host: &str, port: u16) -> Self
pub fn with_server(self, host: &str, port: u16) -> Self
Set server host and port
Sourcepub fn with_title(self, title: &str) -> Self
pub fn with_title(self, title: &str) -> Self
Set page title
Sourcepub fn with_custom_css(self, css: &str) -> Self
pub fn with_custom_css(self, css: &str) -> Self
Add custom CSS
Sourcepub fn with_custom_js(self, js: &str) -> Self
pub fn with_custom_js(self, js: &str) -> Self
Add custom JavaScript
Sourcepub fn with_oauth(self, oauth: OAuthConfig) -> Self
pub fn with_oauth(self, oauth: OAuthConfig) -> Self
Configure OAuth
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SwaggerConfig
impl Debug for SwaggerConfig
Auto Trait Implementations§
impl Freeze for SwaggerConfig
impl RefUnwindSafe for SwaggerConfig
impl Send for SwaggerConfig
impl Sync for SwaggerConfig
impl Unpin 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