Enum actix_web::Body [] [src]

pub enum Body {
    Empty,
    Binary(Binary),
    Streaming(BodyStream),
    Actor(Box<ActorHttpContext>),
}

Represents various types of http message body.

Variants

Empty response. Content-Length header is set to 0

Specific response body.

Unspecified streaming response. Developer is responsible for setting right Content-Length or Transfer-Encoding headers.

Special body type for actor response.

Methods

impl Body
[src]

[src]

Does this body streaming.

[src]

Is this binary body.

[src]

Create body from slice (copy)

Trait Implementations

impl PartialEq for Body
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Debug for Body
[src]

[src]

Formats the value using the given formatter. Read more

impl<T> From<T> for Body where
    T: Into<Binary>, 
[src]

[src]

Performs the conversion.

impl From<Box<ActorHttpContext>> for Body
[src]

[src]

Performs the conversion.

impl<A, S> From<HttpContext<A, S>> for Body where
    A: Actor<Context = HttpContext<A, S>>,
    S: 'static, 
[src]

[src]

Performs the conversion.

impl<A, S> From<WebsocketContext<A, S>> for Body where
    A: Actor<Context = WebsocketContext<A, S>>,
    S: 'static, 
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl !Send for Body

impl !Sync for Body