pub enum ThingData {
Listing(Box<Listing>),
More(More),
Comment(Box<Comment>),
Link(Box<Link>),
}
Expand description
kind: All things have a kind. The kind is a String identifier that denotes the object’s type. Some examples: Listing, more, t1, t2 data: A custom data structure used to hold valuable information. This object’s format will follow the data structure respective of its kind. See below for specific structures. See https://www.reddit.com/dev/api#fullnames
Variants§
Implementations§
source§impl ThingData
impl ThingData
sourcepub fn as_listing(&self) -> Option<&Listing>
pub fn as_listing(&self) -> Option<&Listing>
Tries to get this ThingData as a listing
sourcepub fn as_listing_mut(&mut self) -> Option<&mut Listing>
pub fn as_listing_mut(&mut self) -> Option<&mut Listing>
Tries to get this ThingData as a mutable listing
sourcepub fn into_listing(self) -> Option<Box<Listing>>
pub fn into_listing(self) -> Option<Box<Listing>>
Tries to turn this ThingData into a listing
Trait Implementations§
source§impl<'de> Deserialize<'de> for ThingData
impl<'de> Deserialize<'de> for ThingData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ThingData
impl RefUnwindSafe for ThingData
impl Send for ThingData
impl Sync for ThingData
impl Unpin for ThingData
impl UnwindSafe for ThingData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more