1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// #![deny(missing_docs)]
//! An async multi-threaded web framework for people who appreciate simplicity.
//!
//! Documentation is sparse at the moment, but the code is well-commented for
//! the most part.
//!
//! If you're interested in contributing, helping with documentation is a great
//! starting point.
//!
//! ## Hello World Example
//!
//! Below is a basic example to demonstrate how to use Via to create a simple
//! web server that responds to requests at `/hello/:name` with a personalized
//! greeting.
//! [Additional examples](https://github.com/zacharygolba/via/tree/main/examples)
//! can be found in our git repository.
//!
//! ```no_run
//! use std::process::ExitCode;
//! use via::{Error, Next, Request, Response, ResultExt, Server};
//!
//! async fn hello(request: Request, _: Next) -> via::Result {
//! // Get a reference to the path parameter `name` from the request uri.
//! let name = request.param("name").percent_decode().into_result()?;
//!
//! // Send a plain text response with our greeting message.
//! Response::build().text(format!("Hello, {}!", name))
//! }
//!
//! #[tokio::main]
//! async fn main() -> Result<ExitCode, Error> {
//! let mut app = via::app(());
//!
//! // Define a route that listens on /hello/:name.
//! app.route("/hello/:name").to(via::get(hello));
//!
//! Server::new(app).listen(("127.0.0.1", 8080)).await
//! }
//! ```
//!
pub use ;
pub use ;
pub use ;
pub use guard;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Server;
pub use ws;