pub struct RedditPost {Show 16 fields
pub id: Option<String>,
pub fullname: Option<String>,
pub title: Option<String>,
pub author: Option<String>,
pub subreddit: Option<String>,
pub url: Option<String>,
pub permalink: Option<String>,
pub selftext: Option<String>,
pub created_utc: Option<f64>,
pub score: Option<i32>,
pub num_comments: Option<i32>,
pub over18: Option<bool>,
pub stickied: Option<bool>,
pub flair_text: Option<String>,
pub is_gallery: Option<bool>,
pub gallery_images: Option<Vec<String>>,
}Expand description
RedditPost : A normalized Reddit post returned by the feed and search endpoints
Fields§
§id: Option<String>Reddit post ID (without type prefix)
fullname: Option<String>Reddit fullname (e.g. t3_abc123)
title: Option<String>§subreddit: Option<String>§url: Option<String>Post URL (may be a gallery URL
permalink: Option<String>Full permalink to the Reddit post
selftext: Option<String>Self-post body text (empty string for link posts)
created_utc: Option<f64>Unix timestamp of post creation
score: Option<i32>§num_comments: Option<i32>§over18: Option<bool>Whether the post is marked NSFW
stickied: Option<bool>§flair_text: Option<String>Link flair text if set
is_gallery: Option<bool>Whether the post is a gallery with multiple images
gallery_images: Option<Vec<String>>Individual image URLs for gallery posts (only present when isGallery is true)
Implementations§
Source§impl RedditPost
impl RedditPost
Sourcepub fn new() -> RedditPost
pub fn new() -> RedditPost
A normalized Reddit post returned by the feed and search endpoints
Trait Implementations§
Source§impl Clone for RedditPost
impl Clone for RedditPost
Source§fn clone(&self) -> RedditPost
fn clone(&self) -> RedditPost
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedditPost
impl Debug for RedditPost
Source§impl Default for RedditPost
impl Default for RedditPost
Source§fn default() -> RedditPost
fn default() -> RedditPost
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RedditPost
impl<'de> Deserialize<'de> for RedditPost
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
Source§impl PartialEq for RedditPost
impl PartialEq for RedditPost
Source§impl Serialize for RedditPost
impl Serialize for RedditPost
impl StructuralPartialEq for RedditPost
Auto Trait Implementations§
impl Freeze for RedditPost
impl RefUnwindSafe for RedditPost
impl Send for RedditPost
impl Sync for RedditPost
impl Unpin for RedditPost
impl UnsafeUnpin for RedditPost
impl UnwindSafe for RedditPost
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