Trait inth_oauth2::client::response::FromResponse [] [src]

pub trait FromResponse: Sized {
    fn from_response(json: &Json) -> Result<Self, ParseError>;

    fn from_response_inherit(json: &Json, prev: &Self) -> Result<Self, ParseError> { ... }
}

Response parsing.

Required Methods

fn from_response(json: &Json) -> Result<Self, ParseError>

Parse a JSON response.

Provided Methods

fn from_response_inherit(json: &Json, 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.

Implementors