pub struct AppConfig(/* private fields */);
Expand description
Application configuration
Implementations§
source§impl AppConfig
impl AppConfig
sourcepub fn new(secure: bool, addr: SocketAddr, host: String) -> Self
pub fn new(secure: bool, addr: SocketAddr, host: String) -> Self
Create an AppConfig instance.
sourcepub fn host(&self) -> &str
pub fn host(&self) -> &str
Server host name.
Host name is used by application router as a hostname for url generation. Check ConnectionInfo documentation for more information.
By default host name is set to a “localhost” value.
sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Returns the socket address of the local half of this TCP connection
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl !Send for AppConfig
impl !Sync for AppConfig
impl Unpin for AppConfig
impl UnwindSafe for AppConfig
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