Struct iroh_dns_server::http::HttpServer
source · pub struct HttpServer { /* private fields */ }
Expand description
The HTTP(S) server part of iroh-dns-server
Implementations§
source§impl HttpServer
impl HttpServer
sourcepub async fn spawn(
http_config: Option<HttpConfig>,
https_config: Option<HttpsConfig>,
rate_limit_config: RateLimitConfig,
state: AppState
) -> Result<HttpServer>
pub async fn spawn( http_config: Option<HttpConfig>, https_config: Option<HttpsConfig>, rate_limit_config: RateLimitConfig, state: AppState ) -> Result<HttpServer>
Spawn the server
sourcepub fn http_addr(&self) -> Option<SocketAddr>
pub fn http_addr(&self) -> Option<SocketAddr>
Get the bound address of the HTTP socket.
sourcepub fn https_addr(&self) -> Option<SocketAddr>
pub fn https_addr(&self) -> Option<SocketAddr>
Get the bound address of the HTTPS socket.
sourcepub async fn shutdown(self) -> Result<()>
pub async fn shutdown(self) -> Result<()>
Shutdown the server and wait for all tasks to complete.
sourcepub async fn run_until_done(self) -> Result<()>
pub async fn run_until_done(self) -> Result<()>
Wait for all tasks to complete.
Runs forever unless tasks fail.
Auto Trait Implementations§
impl Freeze for HttpServer
impl !RefUnwindSafe for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl !UnwindSafe for HttpServer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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