Trait inth_oauth2_async::client::response::FromResponse [−][src]
pub trait FromResponse: Sized { fn from_response(json: &Value) -> Result<Self, ParseError>; fn from_response_inherit(
json: &Value,
prev: &Self
) -> Result<Self, ParseError> { ... } }
Expand description
Response parsing.
Required methods
fn from_response(json: &Value) -> Result<Self, ParseError>
fn from_response(json: &Value) -> Result<Self, ParseError>
Parse a JSON response.
Provided methods
fn from_response_inherit(json: &Value, prev: &Self) -> Result<Self, ParseError>
fn from_response_inherit(json: &Value, prev: &Self) -> Result<Self, ParseError>
Parse a JSON response, inheriting missing values from the previous instance.
Necessary for parsing refresh token responses where the absence of a new refresh token implies that the previous refresh token is still valid.