pub struct StreamingHttpResponse {
pub status: u16,
pub headers: HashMap<String, String>,
pub body: Pin<Box<dyn Stream<Item = ApifyClientResult<Vec<u8>>> + Send>>,
}Expand description
A streaming counterpart of HttpResponse: the status and headers, available as soon as
the response starts, and the body delivered incrementally instead of as one buffered Vec<u8>.
Fields§
§status: u16HTTP status code.
headers: HashMap<String, String>Response headers.
body: Pin<Box<dyn Stream<Item = ApifyClientResult<Vec<u8>>> + Send>>The body, as a stream of chunks.
Auto Trait Implementations§
impl !RefUnwindSafe for StreamingHttpResponse
impl !Sync for StreamingHttpResponse
impl !UnwindSafe for StreamingHttpResponse
impl Freeze for StreamingHttpResponse
impl Send for StreamingHttpResponse
impl Unpin for StreamingHttpResponse
impl UnsafeUnpin for StreamingHttpResponse
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