maw/
lib.rs

1use std::sync::LazyLock;
2
3pub use http_body_util;
4pub use hyper;
5
6mod app;
7mod async_fn;
8#[cfg(feature = "cookie")]
9pub mod cookie;
10mod ctx;
11mod error;
12mod handler;
13mod into_response;
14mod locals;
15#[cfg(feature = "logging")]
16pub mod logging;
17mod request;
18mod response;
19mod router;
20mod serializable_any;
21#[cfg(feature = "session")]
22pub mod session;
23mod status_error;
24
25pub fn all() -> http::Method {
26    http::Method::from_bytes(b"*******").expect("failed to create ALL method") // should never happen
27}
28
29pub static ALL: LazyLock<http::Method> = LazyLock::new(all);
30
31pub mod prelude {
32    pub use crate::app::App;
33    pub use crate::ctx::Ctx;
34    pub use crate::error::Error as MawError;
35    pub use crate::router::{Router, WithState};
36    pub use crate::status_error::StatusError;
37    pub use http::StatusCode;
38    pub use http::method::Method;
39    pub use minijinja;
40}
41
42pub use crate::into_response::IntoResponse;
43pub use crate::response::{BoxError, HttpBody};
44pub use app::config::Config;
45#[cfg(feature = "session")]
46pub use session::SessionConfig;
47pub use tokio_util::sync::CancellationToken;