pub struct ServerInfo {
pub version: String,
pub host: String,
pub port: u16,
pub https: bool,
pub docs_path: Option<String>,
pub redoc_path: Option<String>,
pub openapi_path: Option<String>,
}Expand description
Server information for the banner.
Fields§
§version: StringServer version string.
host: StringHost address.
port: u16Port number.
https: boolWhether HTTPS is enabled.
docs_path: Option<String>OpenAPI docs path (if enabled).
redoc_path: Option<String>ReDoc path (if enabled).
openapi_path: Option<String>OpenAPI JSON path.
Implementations§
Source§impl ServerInfo
impl ServerInfo
Sourcepub fn new(
version: impl Into<String>,
host: impl Into<String>,
port: u16,
) -> Self
pub fn new( version: impl Into<String>, host: impl Into<String>, port: u16, ) -> Self
Create a new server info with minimal configuration.
Sourcepub fn redoc_path(self, path: impl Into<String>) -> Self
pub fn redoc_path(self, path: impl Into<String>) -> Self
Set the ReDoc path.
Sourcepub fn openapi_path(self, path: impl Into<String>) -> Self
pub fn openapi_path(self, path: impl Into<String>) -> Self
Set the OpenAPI JSON path.
Trait Implementations§
Source§impl Clone for ServerInfo
impl Clone for ServerInfo
Source§fn clone(&self) -> ServerInfo
fn clone(&self) -> ServerInfo
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 ServerInfo
impl Debug for ServerInfo
Auto Trait Implementations§
impl Freeze for ServerInfo
impl RefUnwindSafe for ServerInfo
impl Send for ServerInfo
impl Sync for ServerInfo
impl Unpin for ServerInfo
impl UnsafeUnpin for ServerInfo
impl UnwindSafe for ServerInfo
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