Crate trillium_tokio[−][src]
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; }
Structs
ClientConfig | configuration for the tcp Connector |
Stopper | This struct provides a synchronized mechanism for canceling Futures and Streams. |
TcpConnector | trillium client Connector for tokio |
Functions
config | Configures a server before running it |
run | Runs a trillium handler in a sync context with default config |
run_async | Runs a trillium handler in an async context with default config |