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§
- Client
Config - configuration for the tcp Connector
- Clone
Counter Observer - An observer that can be cloned without modifying the clone counter, but can be used to inspect its state and awaited
- Stopper
- This struct provides a synchronized mechanism for canceling Futures and Streams.
- Tokio
Transport - A transport newtype for tokio
Enums§
- Binding
- 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).