Expand description

Trillium server adapter for async-std

fn main() {
    trillium_async_std::run(|conn: trillium::Conn| async move {
        conn.ok("hello async-std")
    });
}
#[async_std::main]
async fn main() {
    trillium_async_std::run_async(|conn: trillium::Conn| async move {
        conn.ok("hello async-std")
    }).await;
}

Re-exports

  • pub use async_std;

Structs

  • A transport newtype for async-std
  • configuration for the tcp Connector
  • An observer that can be cloned without modifying the clone counter, but can be used to inspect its state and awaited
  • This struct provides a synchronized mechanism for canceling Futures and Streams.

Enums

  • A wrapper enum that has blanket implementations for common traits like TryFrom, Stream, AsyncRead, and AsyncWrite. This can contain listeners (like TcpListener), Streams (like Incoming), or bytestreams (like TcpStream).

Functions

  • Configures a server before running it
  • Runs a trillium handler in a sync context with default config
  • Runs a trillium handler in an async context with default config
  • spawn and detach a Future that returns ()