Trait inth_oauth2::client::response::FromResponse
source · 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
sourcefn from_response(json: &Value) -> Result<Self, ParseError>
fn from_response(json: &Value) -> Result<Self, ParseError>
Parse a JSON response.
Provided Methods
sourcefn 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.