Expand description

Trillium server adapter for tokio

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

Re-exports

pub use async_compat;
pub use tokio;
pub use tokio_stream;

Structs

configuration for the tcp Connector

This struct provides a synchronized mechanism for canceling Futures and Streams.

trillium client Connector for tokio

Functions

reexport tokio runtime block_on

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