[−][src]Enum actix_web::body::Body
Represents various types of http message body.
Variants
Empty response. Content-Length
header is not set.
Zero sized response body. Content-Length
header is set to 0
.
Bytes(Bytes)
Specific response body.
Message(Box<dyn MessageBody + 'static + Unpin>)
Generic message body.
Implementations
impl Body
[src]
pub fn from_slice(s: &[u8]) -> Body
[src]
Create body from slice (copy)
pub fn from_message<B>(body: B) -> Body where
B: 'static + MessageBody + Unpin,
[src]
B: 'static + MessageBody + Unpin,
Create body from generic message body.
Trait Implementations
impl Debug for Body
[src]
impl<'a> From<&'a String> for Body
[src]
impl From<&'static [u8]> for Body
[src]
impl From<&'static str> for Body
[src]
impl<S, E> From<BodyStream<S, E>> for Body where
E: Into<Error> + 'static,
S: Stream<Item = Result<Bytes, E>> + Unpin + 'static,
[src]
E: Into<Error> + 'static,
S: Stream<Item = Result<Bytes, E>> + Unpin + 'static,
fn from(s: BodyStream<S, E>) -> Body
[src]
impl From<Bytes> for Body
[src]
impl From<BytesMut> for Body
[src]
impl<S> From<SizedStream<S>> for Body where
S: Stream<Item = Result<Bytes, Error>> + Unpin + 'static,
[src]
S: Stream<Item = Result<Bytes, Error>> + Unpin + 'static,
fn from(s: SizedStream<S>) -> Body
[src]
impl From<String> for Body
[src]
impl From<Value> for Body
[src]
impl From<Vec<u8>> for Body
[src]
impl MessageBody for Body
[src]
fn size(&self) -> BodySize
[src]
fn poll_next(
self: Pin<&mut Body>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
[src]
self: Pin<&mut Body>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
impl PartialEq<Body> for Body
[src]
impl<'pin> Unpin for Body where
__Body<'pin>: Unpin,
[src]
__Body<'pin>: Unpin,
impl UnsafeUnpin for Body
[src]
Auto Trait Implementations
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,