[−][src]Enum actix_web::dev::Body
Represents various types of http message body.
Variants
None
Empty response. Content-Length
header is not set.
Empty
Zero sized response body. Content-Length
header is set to 0
.
Bytes(Bytes)
Specific response body.
Message(Box<dyn MessageBody + 'static>)
Generic message body.
Methods
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,
[src]
B: 'static + MessageBody,
Create body from generic message body.
Trait Implementations
impl From<Bytes> for Body
[src]
impl From<&'static str> for Body
[src]
impl From<String> for Body
[src]
impl From<&'static [u8]> for Body
[src]
impl From<BytesMut> for Body
[src]
impl From<Vec<u8>> for Body
[src]
impl<'a> From<&'a String> for Body
[src]
impl MessageBody for Body
[src]
fn length(&self) -> BodySize
[src]
fn poll_next(&mut self) -> Result<Async<Option<Bytes>>, Error>
[src]
impl Debug for Body
[src]
impl PartialEq<Body> 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.