Struct simplist::HttpContent
[−]
[src]
pub struct HttpContent { /* fields omitted */ }
the optional body of a http request.
instances of this object are generally instantiated using one of the provided
From
or
Into
conversions.
conversions
HttpContent
s can be created from any of the following types, or from an
Option
of any of the following types:
byte types
string types
types from other crates
Methods
impl HttpContent
[src]
fn none() -> HttpContent
[src]
creates a content object that is empty and has no value.
examples
use simplist::HttpContent; let content = HttpContent::none();
Trait Implementations
impl Debug for HttpContent
[src]
impl Default for HttpContent
[src]
fn default() -> HttpContent
[src]
Returns the "default value" for a type. Read more
impl Into<Body> for HttpContent
[src]
impl From<Bytes> for HttpContent
[src]
fn from(bytes: Bytes) -> HttpContent
[src]
Performs the conversion.
impl From<Vec<u8>> for HttpContent
[src]
fn from(vec: Vec<u8>) -> HttpContent
[src]
Performs the conversion.
impl From<&'static [u8]> for HttpContent
[src]
fn from(slice: &'static [u8]) -> HttpContent
[src]
Performs the conversion.
impl From<String> for HttpContent
[src]
fn from(string: String) -> HttpContent
[src]
Performs the conversion.
impl From<&'static str> for HttpContent
[src]
fn from(slice: &'static str) -> HttpContent
[src]
Performs the conversion.
impl From<Option<Body>> for HttpContent
[src]
fn from(body: Option<Body>) -> HttpContent
[src]
Performs the conversion.
impl<T> From<Option<T>> for HttpContent where
T: Into<HttpContent>,
[src]
T: Into<HttpContent>,
fn from(body: Option<T>) -> HttpContent
[src]
Performs the conversion.