Skip to main content

answer

Function answer 

Source
pub fn answer<T: DeserializeOwned>(
    status: u16,
    body: &[u8],
) -> Result<T, ApiError>
Expand description

The value a status and body answer holds.

ยงErrors

ApiError::Status for any status but 200, with the title of the problem document if the body is one; ApiError::Malformed for a 200 whose body is not a T.