pub async fn listen(self, host: impl ToSocketAddrs) -> anyhow::Result<()> {
        let mut addrs = tokio::net::lookup_host(host).await?;
        let addr = addrs
            .next()
            .ok_or_else(|| anyhow::Error::msg("host lookup returned no hosts"))?;

        let builder = hyper::Server::try_bind(&addr)?;
        self.internal_serve(builder).await
    }
/// Start a server listening on the given address (See `ToSocketAddrs` from tokio)
/// This method only returns if there is an error. (Graceful shutdown is TODO)
Start a server listening on the given address (See `ToSocketAddrs` from tokio)
This method only returns if there is an error. (Graceful shutdown is TODO)
Start a server listening on the given address ( See ` ToSocketAddrs ` from tokio ) This method only returns if there is an error . ( Graceful shutdown is TODO )
pub async fn listen(self, host: impl ToSocketAddrs) -> anyhow::Result<()> {
        let mut addrs = tokio::net::lookup_host(host).await?;
        let addr = addrs
            .next()
            .ok_or_else(|| anyhow::Error::msg("host lookup returned no hosts"))?;
        let builder = hyper::Server::try_bind(&addr)?;
        self.internal_serve(builder).await
    }
pub async fn listen ( self , host : impl ToSocketAddrs ) -> anyhow :: Result < ( ) > { let mut addrs = tokio :: net :: lookup_host ( host ) . await ? ; let addr = addrs . next ( ) . ok_or_else ( | | anyhow :: Error :: msg ( " " ) ) ? ; let builder = hyper :: Server :: try_bind ( & addr ) ? ; self . internal_serve ( builder ) . await }
Start a server listening on the given address (See `ToSocketAddrs` from tokio)
This method only returns if there is an error.
Start a server listening on the given address ( See ` ToSocketAddrs ` from tokio ) This method only returns if there is an error .
self
host
impl ToSocketAddrs