pub struct StreamingResponse {
pub status: u16,
pub headers: Vec<(String, String)>,
pub body: ResponseBody,
}Expand description
A streaming response a handler returns for a verbatim forward (ADR-014): a status, extra headers, and a body piped to the client without buffering.
Fields§
§status: u16The HTTP status code.
headers: Vec<(String, String)>Extra response headers (beyond the content type the transport sets).
body: ResponseBodyThe response body, a live stream, or buffered bytes for an error.
Implementations§
Source§impl StreamingResponse
impl StreamingResponse
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StreamingResponse
impl !Sync for StreamingResponse
impl !UnwindSafe for StreamingResponse
impl Freeze for StreamingResponse
impl Send for StreamingResponse
impl Unpin for StreamingResponse
impl UnsafeUnpin for StreamingResponse
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request