pub struct ServerConfig {
pub address: String,
pub port: u16,
pub mount_point: String,
}Expand description
Base configuration for a server
Fields§
§address: StringThe address to attach the listener to
port: u16The port to serve
mount_point: StringThe mount point of every request URL “/” is a good default to let proxy sort this
Implementations§
Source§impl ServerConfig
impl ServerConfig
pub fn from_env() -> ServerConfig
pub fn from_env_or(default_config: ServerConfig) -> ServerConfig
pub fn get_socket_address(&self) -> String
Trait Implementations§
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§fn default() -> ServerConfig
fn default() -> ServerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
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