pub trait Thing {
fn from_value(data: &Value, app: &App) -> Result<Self, Error>
where
Self: Sized;
}
Expand description
A trait representing a reddit Thing that can be deserialized from JSON
Required Methods§
sourcefn from_value(data: &Value, app: &App) -> Result<Self, Error>where
Self: Sized,
fn from_value(data: &Value, app: &App) -> Result<Self, Error>where
Self: Sized,
Parses the thing from json
Arguments
data
- A reference to json data to be parsedapp
- A reference to a reddit app. This is necessary in case more data is needed to be retrieved in order to completely parse the value