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.
11mod bytes;
12
13/// Module for extracting data from requests, such as query parameters or JSON payloads.
14pub mod extractors;
15
16/// Module for defining and managing request handlers.
17mod handler;
18
19/// Module for defining and managing middleware.
20pub mod middleware;
21
22/// Module for defining and managing plugins.
23#[cfg(feature = "plugins")]
24pub mod plugins;
25
26/// Module for creating and sending HTTP responses.
27pub mod responder;
28
29/// Module for defining application routes and their handlers.
30mod route;
31
32/// Module for managing the application's routing logic.
33pub mod router;
34
35/// Module for starting and managing the web server.
36mod server;
37
38/// Module for handling Server-Sent Events (SSE).
39pub mod sse;
40
41/// Module for managing application state and shared data.
42pub mod state;
43
44/// Module for defining and working with custom types used in the framework.
45pub mod types;
46
47/// Module for handling WebSocket connections.
48pub mod ws;
49
50pub use hyper::Method;
51pub use server::serve;
52
53/// Module for enabling TLS support in the server.
54#[cfg(feature = "tls")]
55pub mod server_tls;
56
57#[cfg(feature = "tls")]
58pub use server_tls::serve_tls;