1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Raw request body access for HTTP requests.
//!
//! This module provides the [`Bytes`](crate::extractors::bytes::Bytes) extractor for accessing the raw HTTP request body
//! as a `hyper::body::Incoming` stream. This is useful when you need low-level access
//! to the request body stream for custom processing, streaming, or when working directly
//! with hyper's body types.
//!
//! # Examples
//!
//! ```rust
//! use tako::extractors::bytes::Bytes;
//! use tako::types::Request;
//! use http_body_util::BodyExt;
//!
//! async fn handle_raw_body(Bytes(body): Bytes<'_>) {
//! // Access the raw hyper body stream
//! println!("Got access to raw body stream");
//!
//! // You can use hyper's body utilities to read the body
//! // let full_body = body.collect().await.unwrap();
//! // let bytes = full_body.to_bytes();
//! }
//! ```
use Infallible;
use crateTakoBody;
use crateFromRequest;
use crateRequest;
/// Raw request body extractor that provides access to the underlying body stream.
///
/// This extractor wraps a reference to the raw request body implementing `http_body::Body`,
/// allowing direct access to the request body without buffering.
;