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:
david-perez 2022-06-17 15:44:58 +02:00 committed by GitHub
parent 2f2db5a637
commit 5af3b106a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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,