RedditResponse

Type Alias RedditResponse 

Source
pub type RedditResponse = GenericResponse<RedditTypeResponse>;
Expand description

A RedditResponse the type is dynamically decided based on the kind data This is primarily used in Listing that return different type of data

Aliased Type§

pub struct RedditResponse {
    pub kind: RedditDataType,
    pub data: RedditTypeResponse,
}

Fields§

§kind: RedditDataType

The kind value from Reddit

§data: RedditTypeResponse

The Data that Reddit has responded with

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for RedditResponse

Source§

fn deserialize<D>(deserializer: D) -> Result<RedditResponse, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<RedditTypeResponse> for RedditResponse

Source§

fn from(reddit_type: RedditTypeResponse) -> Self

Converts to this type from the input type.