pub struct HttpServer { /* private fields */ }Expand description
The HTTP server state shared by the commands and the pipeline: options,
maintenance mode and the address serve is bound to.
Implementations§
Source§impl HttpServer
impl HttpServer
Sourcepub fn options(&self) -> &HttpOptions
pub fn options(&self) -> &HttpOptions
The HTTP options.
Sourcepub fn maintenance(&self) -> &MaintenanceMode
pub fn maintenance(&self) -> &MaintenanceMode
The maintenance-mode state.
Sourcepub fn local_addr(&self) -> Option<SocketAddr>
pub fn local_addr(&self) -> Option<SocketAddr>
The address serve listens on, while it runs.
Sourcepub async fn wait_bound(&self) -> SocketAddr
pub async fn wait_bound(&self) -> SocketAddr
Waits until serve is listening and returns its address (useful with
addr = "127.0.0.1:0").
Trait Implementations§
Source§impl Debug for HttpServer
impl Debug for HttpServer
Source§impl Injectable for HttpServer
impl Injectable for HttpServer
Source§fn dependencies() -> Vec<ProviderKey>
fn dependencies() -> Vec<ProviderKey>
The keys
construct resolves, used by the boot-time graph check.
Keys resolved through Lazy are left out.Source§impl Lifecycle for HttpServer
Builds the router once at boot, so route mistakes fail the boot. Before that, a plugin’s
mapping of another crate’s errors stops the boot too: only the app answers its errors.
impl Lifecycle for HttpServer
Builds the router once at boot, so route mistakes fail the boot. Before that, a plugin’s mapping of another crate’s errors stops the boot too: only the app answers its errors.
Auto Trait Implementations§
impl !RefUnwindSafe for HttpServer
impl !UnwindSafe for HttpServer
impl Forget for HttpServer
impl Freeze for HttpServer
impl Move for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl UnsafeUnpin for HttpServer
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