[−][src]Trait actix_http::body::MessageBody
Type that provides this trait can be streamed to a peer.
Required methods
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
Implementations
impl dyn MessageBody + 'static[src]
pub fn downcast_ref<T: MessageBody + 'static>(&self) -> Option<&T>[src]
Downcasts generic body to a specific type.
pub fn downcast_mut<T: MessageBody + 'static>(&mut self) -> Option<&mut T>[src]
Downcasts a generic body to a mutable specific type.
Implementations on Foreign Types
impl MessageBody for ()[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl<T: MessageBody + Unpin> MessageBody for Box<T>[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl MessageBody for Bytes[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl MessageBody for BytesMut[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl MessageBody for &'static str[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl MessageBody for Vec<u8>[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl MessageBody for String[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
Implementors
impl MessageBody for Body[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl<B: MessageBody> MessageBody for ResponseBody<B>[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl<B: MessageBody> MessageBody for Encoder<B>[src]
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl<S> MessageBody for SizedStream<S> where
S: Stream<Item = Result<Bytes, Error>> + Unpin, [src]
S: Stream<Item = Result<Bytes, Error>> + Unpin,
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
Attempts to pull out the next value of the underlying Stream.
Empty values are skipped to prevent SizedStream's transmission being
ended on a zero-length chunk, but rather proceed until the underlying
Stream ends.
impl<S, E> MessageBody for BodyStream<S, E> where
S: Stream<Item = Result<Bytes, E>> + Unpin,
E: Into<Error>, [src]
S: Stream<Item = Result<Bytes, E>> + Unpin,
E: Into<Error>,
pub fn size(&self) -> BodySize[src]
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
Attempts to pull out the next value of the underlying Stream.
Empty values are skipped to prevent BodyStream's transmission being
ended on a zero-length chunk, but rather proceed until the underlying
Stream ends.