pub async fn server_address(&mut self) -> Result<SocketAddr, StartupError> {
        let addr = match self.server_address {
            Ok(ref addr) => return Ok(*addr),
            Err(ref mut chan) => chan.await.map_err(|_| StartupError::ServerClosed)?,
        };

        self.server_address = Ok(addr);
        // Unwrap is okay here as we just set the value to Ok.
        Ok(*self.server_address.as_ref().unwrap())
    }
/// Get the address of the server. This first waits until the server is started
/// up and listening and then returns the address the server has gotten. Especially
/// useful when using 0 as port and you want to know what port the server has gotten.
Get the address of the server. This first waits until the server is started
up and listening and then returns the address the server has gotten. Especially
useful when using 0 as port and you want to know what port the server has gotten.
Get the address of the server . This first waits until the server is started up and listening and then returns the address the server has gotten . Especially useful when using 0 as port and you want to know what port the server has gotten .
pub async fn server_address(&mut self) -> Result<SocketAddr, StartupError> {
        let addr = match self.server_address {
            Ok(ref addr) => return Ok(*addr),
            Err(ref mut chan) => chan.await.map_err(|_| StartupError::ServerClosed)?,
        };
        self.server_address = Ok(addr);
        // Unwrap is okay here as we just set the value to Ok.
        Ok(*self.server_address.as_ref().unwrap())
    }
pub async fn server_address ( & mut self ) -> Result < SocketAddr , StartupError > { let addr = match self . server_address { Ok ( ref addr ) => return Ok ( * addr ) , Err ( ref mut chan ) => chan . await . map_err ( | _ | StartupError :: ServerClosed ) ? , } ; self . server_address = Ok ( addr ) ; // Unwrap is okay here as we just set the value to Ok. Ok ( * self . server_address . as_ref ( ) . unwrap ( ) ) }
Get the address of the server.
Get the address of the server .
&mut self
&mut self