tako/
lib.rs

1//! Tako: A lightweight web framework for building asynchronous web applications in Rust.
2//!
3//! This library provides a modular and extensible framework for creating web servers,
4//! handling requests, and managing application state. It is designed to be fast, ergonomic,
5//! and easy to use.
6
7/// Module for handling HTTP request and response bodies.
8pub mod body;
9
10/// Module for working with byte streams and buffers.
11pub mod bytes;
12
13#[cfg(feature = "client")]
14pub mod client;
15
16/// Module for extracting data from requests, such as query parameters or JSON payloads.
17pub mod extractors;
18
19/// Module for defining and managing request handlers.
20mod handler;
21
22/// Module for defining and managing middleware.
23pub mod middleware;
24
25/// Module for defining and managing plugins.
26#[cfg(feature = "plugins")]
27pub mod plugins;
28
29/// Module for creating and sending HTTP responses.
30pub mod responder;
31
32/// Module for defining application routes and their handlers.
33mod route;
34
35/// Module for managing the application's routing logic.
36pub mod router;
37
38/// Module for starting and managing the web server.
39mod server;
40
41/// Module for handling Server-Sent Events (SSE).
42pub mod sse;
43
44/// Module for managing application state and shared data.
45pub mod state;
46
47#[cfg(feature = "tako-tracing")]
48pub mod tracing;
49
50/// Module for defining and working with custom types used in the framework.
51pub mod types;
52
53/// Module for handling WebSocket connections.
54pub mod ws;
55
56pub use hyper::Method;
57pub use server::serve;
58
59/// Module for enabling TLS support in the server.
60#[cfg(feature = "tls")]
61pub mod server_tls;
62
63#[cfg(feature = "tls")]
64pub use server_tls::serve_tls;