Available on crate feature
http only.Expand description
Utilities for working with HTTP message bodies.
This module provides extension traits and utilities for working with
wasip3::http_compat::IncomingBody instances, such as streaming or collecting the entire
body into memory.
These helpers make it easier to transform low-level streaming body types
into higher-level forms (e.g., bytes::Bytes) for simplified data handling.
Traits§
- Incoming
Body Ext - Extension trait providing convenient methods for consuming an
IncomingBody.
Functions§
- stream
- Create a streaming body, with a
Senderfor writing to the body. This supports strings,Bytes,Vec<u8>, and anyIntoIterator<Item = u8>. For types which are notInto<Bytes>, usestream_any. - stream_
any - Create a streaming body, with a
Senderfor writing to the body. This supports any type, but requires you to provider a converter from your type toBytes. (For types that implementInto<Bytes>, usestream).