pub struct Request { /* private fields */ }Expand description
Represents an HTTP request object. It consists of the request headers and body.
Implementations§
source§impl Request
impl Request
sourcepub async fn data(&mut self) -> Option<Result<Bytes>>
pub async fn data(&mut self) -> Option<Result<Bytes>>
Retrieve the next chunk of data from the request body.
sourcepub fn is_end_stream(&self) -> bool
pub fn is_end_stream(&self) -> bool
Returns true if the receive half has reached the end of stream.
A return value of true means that calls to poll and poll_trailers
will both return None.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
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