Enum actix_web::BinaryBody [] [src]

pub enum BinaryBody {
    Bytes(Bytes),
    Slice(&'static [u8]),
    SharedBytes(Rc<Bytes>),
    SharedString(Rc<String>),
    // some variants omitted
}

Represents various types of binary body. Content-Length header is set to length of the body.

Variants

Bytes body

Static slice

Shared bytes body

Shared stirng body

Methods

impl BinaryBody
[src]

[src]

[src]

[src]

Create binary body from slice

Trait Implementations

impl Debug for BinaryBody
[src]

[src]

Formats the value using the given formatter.

impl From<&'static str> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<&'static [u8]> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<Vec<u8>> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<String> for BinaryBody
[src]

[src]

Performs the conversion.

impl<'a> From<&'a String> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<Bytes> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<BytesMut> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<Rc<Bytes>> for BinaryBody
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Rc<Bytes>> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<Arc<Bytes>> for BinaryBody
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Arc<Bytes>> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<Rc<String>> for BinaryBody
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Rc<String>> for BinaryBody
[src]

[src]

Performs the conversion.

impl From<Arc<String>> for BinaryBody
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Arc<String>> for BinaryBody
[src]

[src]

Performs the conversion.

impl AsRef<[u8]> for BinaryBody
[src]

[src]

Performs the conversion.