Struct roadrunner::Content
[−]
[src]
pub struct Content { /* fields omitted */ }Holds the body content of a response.
Methods
impl Content[src]
fn as_ref_string(&self) -> &str
Get the raw body content as a &str.
fn as_value(&self) -> Result<Value, Error>
Get the body content as a serde_json::value::Value.
fn as_typed<T: DeserializeOwned>(&self) -> Result<T, Error>
Get the body content as a strongly typed struct.
The struct has to implement Serde's Deserialize trait.