[−][src]Enum actix_web::Body
Represents various types of http message body.
Variants
EmptyEmpty response. Content-Length header is set to 0
Binary(Binary)Specific response body.
Streaming(BodyStream)Unspecified streaming response. Developer is responsible for setting
right Content-Length or Transfer-Encoding headers.
Actor(Box<dyn ActorHttpContext>)Special body type for actor response.
Methods
impl Body[src]
pub fn is_streaming(&self) -> bool[src]
Does this body streaming.
pub fn is_binary(&self) -> bool[src]
Is this binary body.
pub fn is_empty(&self) -> bool[src]
Is this binary empy.
pub fn from_slice(s: &[u8]) -> Body[src]
Create body from slice (copy)
Trait Implementations
impl PartialEq<Body> for Body[src]
fn eq(&self, other: &Body) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl<T> From<T> for Body where
T: Into<Binary>, [src]
T: Into<Binary>,
impl From<Box<dyn ActorHttpContext + 'static>> for Body[src]
impl Debug for Body[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto 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.