mirror of https://github.com/smithy-lang/smithy-rs
Remove `#[doc(hidden)]` from `aws_smithy_http_server::body::BoxBody` (#1453)
And from the `boxed` body function. These are necessary if users need to implement middleware (`tower::Layer`s) that use the request's body.
This commit is contained in:
parent
2f2db5a637
commit
5af3b106a0
|
@ -4,22 +4,21 @@
|
|||
*/
|
||||
|
||||
//! HTTP body utilities.
|
||||
|
||||
// Used in the codegen in trait bounds.
|
||||
#[doc(hidden)]
|
||||
pub use http_body::Body as HttpBody;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use hyper::body::Body;
|
||||
|
||||
use bytes::Bytes;
|
||||
|
||||
use crate::error::{BoxError, Error};
|
||||
|
||||
#[doc(hidden)]
|
||||
pub type BoxBody = http_body::combinators::UnsyncBoxBody<Bytes, Error>;
|
||||
|
||||
// `boxed` is used in the codegen of the implementation of the operation `Handler` trait.
|
||||
/// Convert a [`http_body::Body`] into a [`BoxBody`].
|
||||
#[doc(hidden)]
|
||||
pub fn boxed<B>(body: B) -> BoxBody
|
||||
where
|
||||
B: http_body::Body<Data = Bytes> + Send + 'static,
|
||||
|
|
Loading…
Reference in New Issue