pub struct RequestBody { /* private fields */ }Implementations§
Source§impl RequestBody
impl RequestBody
pub fn absent() -> Self
pub fn explicit_empty() -> Self
pub fn empty() -> Self
pub fn from_bytes(bytes: Bytes) -> Self
pub fn from_static(bytes: &'static [u8]) -> Self
pub fn from_stream<S, E>(stream: S) -> Self
pub fn try_clone(&self) -> Option<Self>
pub fn replayable_len(&self) -> Option<u64>
pub fn is_absent(&self) -> bool
Trait Implementations§
Source§impl Body for RequestBody
impl Body for RequestBody
Source§impl Debug for RequestBody
impl Debug for RequestBody
Source§impl Default for RequestBody
impl Default for RequestBody
Source§impl From<&'static [u8]> for RequestBody
impl From<&'static [u8]> for RequestBody
Source§impl From<&'static str> for RequestBody
impl From<&'static str> for RequestBody
Source§impl From<Bytes> for RequestBody
impl From<Bytes> for RequestBody
Source§impl From<String> for RequestBody
impl From<String> for RequestBody
impl<'__pin> Unpin for RequestBodywhere
PinnedFieldsOf<__Origin<'__pin>>: Unpin,
Auto Trait Implementations§
impl !Freeze for RequestBody
impl !RefUnwindSafe for RequestBody
impl !UnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl UnsafeUnpin for RequestBody
Blanket Implementations§
Source§impl<T> BodyExt for T
impl<T> BodyExt for T
Source§fn frame(&mut self) -> Frame<'_, Self>where
Self: Unpin,
fn frame(&mut self) -> Frame<'_, Self>where
Self: Unpin,
Returns a future that resolves to the next
Frame, if any.Source§fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
Maps this body’s frame to a different kind.
Source§fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
Maps this body’s error value to a different value.
Source§fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
Turn this body into a boxed trait object that is !Sync.
Source§fn collect(self) -> Collect<Self>where
Self: Sized,
fn collect(self) -> Collect<Self>where
Self: Sized,
Turn this body into
Collected body which will collect all the DATA frames
and trailers.Source§fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
Add trailers to the body. Read more
Source§fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
Turn this body into
BodyDataStream.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