Skip to content

Commit a294fed

Browse files
authored
Merge branch 'main' into merge_flush
2 parents 3de3fc0 + b92527f commit a294fed

File tree

3 files changed

+30
-25
lines changed

3 files changed

+30
-25
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

volo-http/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "volo-http"
3-
version = "0.1.9"
3+
version = "0.1.11"
44
edition.workspace = true
55
homepage.workspace = true
66
repository.workspace = true

volo-http/src/lib.rs

+28-23
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,38 @@ pub mod request;
1313
pub mod response;
1414
pub mod route;
1515
pub mod server;
16+
1617
pub(crate) mod service_fn;
1718

1819
mod 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

Comments
 (0)