pub enum IncomingBody {
Hyper(Incoming),
Quic(QuicIncomingBody<RecvStream>),
}
Expand description
The body of an incoming request.
This enum is used to abstract away the differences between the body types of HTTP/1, HTTP/2 and HTTP/3.
It implements the [http_body::Body
] trait.
Variants§
Hyper(Incoming)
Available on crate features
http1
or http2
only.The body of an incoming hyper request.
Quic(QuicIncomingBody<RecvStream>)
Available on crate feature
http3
only.The body of an incoming h3 request.
Trait Implementations§
Source§impl Body for IncomingBody
impl Body for IncomingBody
Source§type Error = IncomingBodyError
type Error = IncomingBodyError
The error type this
Body
might generate.Source§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Returns
true
when the end of stream has been reached. Read moreSource§impl From<Incoming> for IncomingBody
Available on crate features http1
or http2
only.
impl From<Incoming> for IncomingBody
Available on crate features
http1
or http2
only.Source§impl From<QuicIncomingBody<RecvStream>> for IncomingBody
Available on crate feature http3
only.
impl From<QuicIncomingBody<RecvStream>> for IncomingBody
Available on crate feature
http3
only.Source§fn from(body: QuicIncomingBody<RecvStream>) -> Self
fn from(body: QuicIncomingBody<RecvStream>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for IncomingBody
impl !RefUnwindSafe for IncomingBody
impl Send for IncomingBody
impl Sync for IncomingBody
impl Unpin for IncomingBody
impl !UnwindSafe for IncomingBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more