pub async fn run(listener: TcpListener, shutdown: impl Future) -> Result<()>Expand description
Run the mini-redis server.
Accepts connections from the supplied listener. For each inbound connection,
a task is spawned to handle that connection. The server runs until the
shutdown future completes, at which point the server shuts down
gracefully.
tokio::signal::ctrl_c() can be used as the shutdown argument. This will
listen for a SIGINT signal.