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
pub mod context;
#[cfg(feature = "cookie")]
pub mod cookie;
pub mod extension;
pub mod extract;
pub mod handler;
#[cfg(any(feature = "serde_json", feature = "sonic_json"))]
pub mod json;
pub mod layer;
pub mod middleware;
pub mod param;
pub mod request;
pub mod response;
pub mod route;
pub mod server;

pub(crate) mod service_fn;

mod macros;

#[doc(hidden)]
mod prelude {
    pub use bytes::Bytes;
    pub use hyper::{
        self,
        body::Incoming as BodyIncoming,
        http::{self, HeaderMap, HeaderName, HeaderValue, Method, StatusCode, Uri, Version},
    };
    pub use volo::net::Address;

    #[cfg(feature = "cookie")]
    pub use crate::cookie::CookieJar;
    #[cfg(any(feature = "serde_json", feature = "sonic_json"))]
    pub use crate::json::Json;
    pub use crate::{
        context::{ConnectionInfo, HttpContext},
        extension::Extension,
        extract::{Form, MaybeInvalid, Query, State},
        param::Params,
        request::Request,
        response::Response,
        route::Router,
        server::Server,
    };

    pub type DynService =
        motore::BoxCloneService<HttpContext, BodyIncoming, Response, std::convert::Infallible>;
}

pub use prelude::*;