pub enum RequestBody {
Boxed(BoxBody),
None,
}Expand description
A unified request body type for different http protocols. This enables one service type to handle multiple http protocols.
Variants§
Implementations§
Source§impl RequestBody
impl RequestBody
pub fn into_boxed(self) -> BoxBody
Trait Implementations§
Source§impl Body for RequestBody
impl Body for RequestBody
Source§type Data = Bytes
type Data = Bytes
The payload data type yielded by
Frame::Data variants.Source§type Error = Box<dyn Error + Send + Sync>
type Error = Box<dyn Error + Send + Sync>
The error type that can occur while producing frames.
Source§fn poll_frame(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
Attempt to pull the next frame from the body. Read more
Source§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Indicates whether the body has been fully consumed. Read more
Source§impl Default for RequestBody
impl Default for RequestBody
Source§fn default() -> RequestBody
fn default() -> RequestBody
Returns the “default value” for a type. Read more
Source§impl From<&'static [u8]> for RequestBody
impl From<&'static [u8]> for RequestBody
Source§impl From<BoxBody> for RequestBody
impl From<BoxBody> for RequestBody
Source§impl From<Bytes> for RequestBody
impl From<Bytes> for RequestBody
Source§impl From<String> for RequestBody
impl From<String> for RequestBody
Auto Trait Implementations§
impl Freeze for RequestBody
impl !RefUnwindSafe for RequestBody
impl !Send for RequestBody
impl !Sync for RequestBody
impl Unpin for RequestBody
impl UnsafeUnpin for RequestBody
impl !UnwindSafe for RequestBody
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