Struct tsukuyomi::output::ResponseBody
source · pub struct ResponseBody(_);
Expand description
A type representing the message body in an HTTP response.
Implementations
Trait Implementations
sourceimpl BufStream for ResponseBody
impl BufStream for ResponseBody
sourcefn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error>
fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error>
Attempt to pull out the next buffer of this stream, registering the
current task for wakeup if the value is not yet available, and returning
None
if the stream is exhausted. Read moresourcefn size_hint(&self) -> SizeHint
fn size_hint(&self) -> SizeHint
Returns the bounds on the remaining length of the iterator. Read more
sourcefn chain<T>(self, other: T) -> Chain<Self, T>where
Self: Sized,
T: BufStream<Error = Self::Error>,
fn chain<T>(self, other: T) -> Chain<Self, T>where
Self: Sized,
T: BufStream<Error = Self::Error>,
Takes two buf streams and creates a new buf stream over both in
sequence. Read more
sourcefn collect<T>(self) -> Collect<Self, T>where
Self: Sized,
T: FromBufStream,
fn collect<T>(self) -> Collect<Self, T>where
Self: Sized,
T: FromBufStream,
Consumes all data from
self
, storing it in byte storage of type T
.sourceimpl Debug for ResponseBody
impl Debug for ResponseBody
sourceimpl Default for ResponseBody
impl Default for ResponseBody
sourcefn default() -> ResponseBody
fn default() -> ResponseBody
Returns the “default value” for a type. Read more
sourceimpl From<&'static [u8]> for ResponseBody
impl From<&'static [u8]> for ResponseBody
sourceimpl From<&'static str> for ResponseBody
impl From<&'static str> for ResponseBody
sourceimpl From<()> for ResponseBody
impl From<()> for ResponseBody
sourceimpl From<Body> for ResponseBody
impl From<Body> for ResponseBody
sourceimpl From<Bytes> for ResponseBody
impl From<Bytes> for ResponseBody
sourceimpl From<Cow<'static, [u8]>> for ResponseBody
impl From<Cow<'static, [u8]>> for ResponseBody
sourceimpl From<Cow<'static, str>> for ResponseBody
impl From<Cow<'static, str>> for ResponseBody
sourceimpl From<RequestBody> for ResponseBody
impl From<RequestBody> for ResponseBody
sourcefn from(body: RequestBody) -> Self
fn from(body: RequestBody) -> Self
Converts to this type from the input type.
sourceimpl From<String> for ResponseBody
impl From<String> for ResponseBody
sourceimpl Payload for ResponseBody
impl Payload for ResponseBody
sourcefn poll_data(&mut self) -> Poll<Option<Self::Data>, Self::Error>
fn poll_data(&mut self) -> Poll<Option<Self::Data>, Self::Error>
Poll for a
Data
buffer. Read moresourcefn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>
fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>
Poll for an optional single
HeaderMap
of trailers. Read moresourcefn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
A hint that the
Body
is complete, and doesn’t need to be polled more. Read moresourcefn content_length(&self) -> Option<u64>
fn content_length(&self) -> Option<u64>
Return a length of the total bytes that will be streamed, if known. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ResponseBody
impl Send for ResponseBody
impl !Sync for ResponseBody
impl Unpin for ResponseBody
impl !UnwindSafe for ResponseBody
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more