roa-async-std 0.6.0

tokio-based runtime and acceptor
docs.rs failed to build roa-async-std-0.6.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Stable Test codecov Rust Docs Crate version Download License: MIT

This crate provides async-std-based runtime and acceptor for roa.

use roa::http::StatusCode;
use roa::{App, Context};
use roa_async_std::{Listener, Exec};
use std::error::Error;

async fn end(_ctx: &mut Context) -> roa::Result {
    Ok(())
}

#[async_std::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let (addr, server) = App::with_exec((), Exec).end(end).run()?;
    println!("server is listening on {}", addr);
    server.await?;
    Ok(())
}