pub trait IntoRequestBytes {
// Required method
fn into_request_bytes(
self,
) -> impl Future<Output = Result<Bytes, BoxError>> + Send + Sync;
}
Expand description
A trait for converting various body types into a Bytes
object.
This requires reading the entire body into memory.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl IntoRequestBytes for ()
Convert the unit type ()
into an empty Bytes
object.
impl IntoRequestBytes for ()
Convert the unit type ()
into an empty Bytes
object.
Source§impl IntoRequestBytes for Bytes
Identity transformation: return the Bytes
object as-is.
impl IntoRequestBytes for Bytes
Identity transformation: return the Bytes
object as-is.