pub struct Streaming { /* private fields */ }Expand description
A response head with its unread body.
Implementations§
Source§impl Streaming
impl Streaming
Sourcepub fn header(&self, name: &str) -> Option<&str>
pub fn header(&self, name: &str) -> Option<&str>
The first header with this name, ASCII case-insensitive.
Sourcepub fn expected_length(&self) -> Option<u64>
pub fn expected_length(&self) -> Option<u64>
Content-Length, when the response declared one.
Sourcepub fn into_parts(self) -> (Head, Body)
pub fn into_parts(self) -> (Head, Body)
The head and the body, apart.
Sourcepub fn collect_async(
self,
on_done: impl FnOnce(Result<Response, HttpError>) + Send + 'static,
)
pub fn collect_async( self, on_done: impl FnOnce(Result<Response, HttpError>) + Send + 'static, )
Read the whole body into memory; on_done receives the response.
Sourcepub fn collect_future(self) -> Collecting ⓘ
pub fn collect_future(self) -> Collecting ⓘ
Read the whole body into memory and await the response.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Streaming
impl !UnwindSafe for Streaming
impl Forget for Streaming
impl Freeze for Streaming
impl Move for Streaming
impl Send for Streaming
impl Sync for Streaming
impl Unpin for Streaming
impl UnsafeUnpin for Streaming
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