pub struct HttpStream {
pub status: u16,
pub headers: BTreeMap<String, String>,
pub body: BoxStream<'static, Result<Vec<u8>, ExecError>>,
}Expand description
A response whose body has not been read yet.
The model API is a server-sent-event stream that stays open for the length of an answer, so an egress that could only hand back a finished body could not carry the one request the engine makes most. Status and headers arrive first because that is what the retry ladder classifies on, before a single body byte exists.
Fields§
§status: u16§headers: BTreeMap<String, String>§body: BoxStream<'static, Result<Vec<u8>, ExecError>>Auto Trait Implementations§
impl !RefUnwindSafe for HttpStream
impl !Sync for HttpStream
impl !UnwindSafe for HttpStream
impl Forget for HttpStream
impl Freeze for HttpStream
impl Move for HttpStream
impl Send for HttpStream
impl Unpin for HttpStream
impl UnsafeUnpin for HttpStream
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