pub struct RequestBody { /* private fields */ }Expand description
An asyncrhonous stream to receive the chunks of incoming request body.
Implementations§
Source§impl RequestBody
impl RequestBody
Sourcepub fn empty() -> RequestBody
pub fn empty() -> RequestBody
Create an instance of empty RequestBody.
Sourcepub fn once<T>(body: T) -> RequestBody
pub fn once<T>(body: T) -> RequestBody
Create an instance of RequestBody from a chunk of bytes.
Sourcepub fn from_hyp(body: Body) -> RequestBody
pub fn from_hyp(body: Body) -> RequestBody
Create an instance of RequestBody from hyper::Body.
Sourcepub fn poll_data(&mut self) -> PollResult<Option<Data>, PollDataError>
pub fn poll_data(&mut self) -> PollResult<Option<Data>, PollDataError>
Poll an element of Chunk.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RequestBody
impl !RefUnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl Unpin 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more