Enum rustful::response::Data [] [src]

pub enum Data<'a> {
    Bytes(Cow<'a, [u8]>),
    String(Cow<'a, str>),
}

A unified representation of response data.

Variants

Data in byte form.

Data in string form.

Methods

impl<'a> Data<'a>
[src]

Important traits for &'a [u8]

Borrow the content as a byte slice.

Important traits for Vec<u8>

Turns the content into a byte vector. Slices are copied.

Borrow the content as a UTF-8 string slice, if possible.

Turn the content into a UTF-8 string, if possible. Slices are copied.

Trait Implementations

impl<'a> Clone for Data<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Into<Data<'a>> for Vec<u8>
[src]

Performs the conversion.

impl<'a> Into<Data<'a>> for &'a [u8]
[src]

Performs the conversion.

impl<'a> Into<Data<'a>> for String
[src]

Performs the conversion.

impl<'a> Into<Data<'a>> for &'a str
[src]

Performs the conversion.

Auto Trait Implementations

impl<'a> Send for Data<'a>

impl<'a> Sync for Data<'a>