Struct roa_core::Response [−][src]
Http response type of roa.
Fields
status: StatusCode
Status code.
version: Version
Version of HTTP protocol.
headers: HeaderMap<HeaderValue>
Raw header map.
body: Body
Response body.
Methods from Deref<Target = Body>
pub fn write_stream(
&mut self,
stream: impl Stream<Item = Result<Bytes>> + Sync + Send + 'static
) -> &mut Self
[src]
&mut self,
stream: impl Stream<Item = Result<Bytes>> + Sync + Send + 'static
) -> &mut Self
Write stream.
pub fn write_reader(
&mut self,
reader: impl AsyncRead + Sync + Send + Unpin + 'static
) -> &mut Self
[src]
&mut self,
reader: impl AsyncRead + Sync + Send + Unpin + 'static
) -> &mut Self
Write reader with default chunk size.
pub fn write_chunk(
&mut self,
reader: impl AsyncRead + Sync + Send + Unpin + 'static,
chunk_size: usize
) -> &mut Self
[src]
&mut self,
reader: impl AsyncRead + Sync + Send + Unpin + 'static,
chunk_size: usize
) -> &mut Self
Write reader with chunk size.
pub fn write(&mut self, data: impl Into<Bytes>) -> &mut Self
[src]
Write Bytes
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,