@@ -13,33 +13,38 @@ pub mod request;
1313pub mod response;
1414pub mod route;
1515pub mod server;
16+
1617pub ( crate ) mod service_fn;
1718
1819mod macros;
1920
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 ;
2130
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+ } ;
2945
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+ }
4449
45- pub type DynService = motore :: BoxCloneService < HttpContext , BodyIncoming , Response , Infallible > ;
50+ pub use prelude :: * ;
0 commit comments