@@ -13,33 +13,38 @@ pub mod request;
13
13
pub mod response;
14
14
pub mod route;
15
15
pub mod server;
16
+
16
17
pub ( crate ) mod service_fn;
17
18
18
19
mod macros;
19
20
20
- use std:: convert:: Infallible ;
21
+ #[ doc( hidden) ]
22
+ pub mod prelude {
23
+ pub use bytes:: Bytes ;
24
+ pub use hyper:: {
25
+ self ,
26
+ body:: Incoming as BodyIncoming ,
27
+ http:: { self , HeaderMap , HeaderName , HeaderValue , Method , StatusCode , Uri , Version } ,
28
+ } ;
29
+ pub use volo:: net:: Address ;
21
30
22
- pub use bytes:: Bytes ;
23
- pub use hyper:: {
24
- self ,
25
- body:: Incoming as BodyIncoming ,
26
- http:: { self , HeaderMap , HeaderName , HeaderValue , Method , StatusCode , Uri , Version } ,
27
- } ;
28
- pub use volo:: net:: Address ;
31
+ #[ cfg( feature = "cookie" ) ]
32
+ pub use crate :: cookie:: CookieJar ;
33
+ #[ cfg( any( feature = "serde_json" , feature = "sonic_json" ) ) ]
34
+ pub use crate :: json:: Json ;
35
+ pub use crate :: {
36
+ context:: { ConnectionInfo , HttpContext } ,
37
+ extension:: Extension ,
38
+ extract:: { Form , MaybeInvalid , Query , State } ,
39
+ param:: Params ,
40
+ request:: Request ,
41
+ response:: Response ,
42
+ route:: Router ,
43
+ server:: Server ,
44
+ } ;
29
45
30
- #[ cfg( feature = "cookie" ) ]
31
- pub use crate :: cookie:: CookieJar ;
32
- #[ cfg( any( feature = "serde_json" , feature = "sonic_json" ) ) ]
33
- pub use crate :: json:: Json ;
34
- pub use crate :: {
35
- context:: { ConnectionInfo , HttpContext } ,
36
- extension:: Extension ,
37
- extract:: { Form , MaybeInvalid , Query , State } ,
38
- param:: Params ,
39
- request:: Request ,
40
- response:: Response ,
41
- route:: Router ,
42
- server:: Server ,
43
- } ;
46
+ pub type DynService =
47
+ motore:: BoxCloneService < HttpContext , BodyIncoming , Response , std:: convert:: Infallible > ;
48
+ }
44
49
45
- pub type DynService = motore :: BoxCloneService < HttpContext , BodyIncoming , Response , Infallible > ;
50
+ pub use prelude :: * ;
0 commit comments