pub trait IncomingMessage: Unpin {
// Required methods
fn get_headers(&self) -> Fields;
fn consume_body(
self,
res: RawFutureReader<&'static FutureVtable<Result<(), ErrorCode>>>,
) -> (RawStreamReader<&'static StreamVtable<u8>>, RawFutureReader<&'static FutureVtable<Result<Option<Fields>, ErrorCode>>>);
}Available on crate feature
http only.Expand description
Internal trait representing a readable inbound HTTP message.
Implemented by types that expose request or response headers and provide mechanisms to consume the message body.
Required Methods§
fn get_headers(&self) -> Fields
fn consume_body( self, res: RawFutureReader<&'static FutureVtable<Result<(), ErrorCode>>>, ) -> (RawStreamReader<&'static StreamVtable<u8>>, RawFutureReader<&'static FutureVtable<Result<Option<Fields>, ErrorCode>>>)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".