goose_http/body/mod.rs
1//! Abstractions for request and response bodies.
2//!
3//! The `Body` enum will allow streaming of fixed-size, chunked, or empty
4//! payloads. For now we supply a simplified scaffold.
5
6/// Represents the body of an HTTP message.
7#[derive(Debug, Clone)]
8pub enum Body {
9 /// No body is present.
10 Empty,
11 /// A fixed-length body with the specified number of bytes.
12 Fixed(u64),
13 /// A chunked transfer-coded body.
14 Chunked,
15}
16
17impl Default for Body {
18 fn default() -> Self {
19 Body::Empty
20 }
21}