Trait actix_http::body::MessageBody [−][src]
Type that implement this trait can be streamed to a peer.
Required methods
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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]
fn size(&self) -> BodySize
[src]
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,
fn size(&self) -> BodySize
[src]
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> where
S: Stream<Item = Result<Bytes, E>> + Unpin,
E: Into<Error>,
[src]
S: Stream<Item = Result<Bytes, E>> + Unpin,
E: Into<Error>,
fn size(&self) -> BodySize
[src]
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.