Struct roux::subreddit::responses::submissions::SubmissionsData[][src]

pub struct SubmissionsData {
    pub domain: String,
    pub banned_by: Option<String>,
    pub subreddit: String,
    pub selftext_html: Option<String>,
    pub selftext: String,
    pub likes: Option<bool>,
    pub suggested_sort: Option<String>,
    pub link_flair_text: Option<String>,
    pub id: String,
    pub gilded: u64,
    pub archived: bool,
    pub clicked: bool,
    pub author: String,
    pub score: f64,
    pub approved_by: Option<String>,
    pub over_18: bool,
    pub hidden: bool,
    pub num_comments: u64,
    pub thumbnail: String,
    pub subreddit_id: String,
    pub hide_score: bool,
    pub edited: Value,
    pub link_flair_css_class: Option<String>,
    pub author_flair_css_class: Option<String>,
    pub downs: f64,
    pub ups: f64,
    pub saved: bool,
    pub removal_reason: Option<String>,
    pub stickied: bool,
    pub is_self: bool,
    pub permalink: String,
    pub locked: bool,
    pub name: String,
    pub created: f64,
    pub url: Option<String>,
    pub author_flair_text: Option<String>,
    pub quarantine: bool,
    pub title: String,
    pub created_utc: f64,
    pub distinguished: Option<String>,
    pub visited: bool,
    pub num_reports: Option<u64>,
}

SubmissionsData

Fields

domain: String

The domain of the link (if link post) or self.subreddit (if self post). Domains do not include a protocol, e.g. i.redd.it or self.learnprogramming

banned_by: Option<String>

Contains the name of the moderator who banned this, if the logged-in user is a moderator of this subreddit and this is banned.

subreddit: String

The subreddit that this submission was posted in (not including /r/)

selftext_html: Option<String>

If this is a self post, it contains the HTML of the post body. Otherwise, it is None.

selftext: String

The self text in Markdown format, if this is a self post. Unlike selftext_html, this is an empty string if this is a link post.

likes: Option<bool>

This is Some(true) if the logged-in user has upvoted this submission, Some(false) if the user has downvoted this submission or None if the user has not voted.

suggested_sort: Option<String>

If a specifc sort method is suggested, this is set to the string name of it, otherwise it is None.

Possible values

  • top
  • new
  • controversial
  • old
  • qa
  • confidence
link_flair_text: Option<String>

If this post is flaired, this set to Some(FLAIR TEXT). Otherwise, it is None. Link flairs can be empty strings.

id: String

The ID of the post in base-36 form, as used in Reddit’s links.

gilded: u64

The amount of times that a user has been gilded (gifted Reddit Gold).

archived: bool

This is true if Reddit has archived the submission (usually done after 6 months). Archived submissions cannot be voted or commented upon.

clicked: bool

This is true if the logged-in user has already followed this link, otherwise false.

author: String

The name of the author of the submission (not including the leading /u/)

score: f64

The overall points score of this post, as shown on the upvote counter. This is the same as upvotes - downvotes (however, this figure may be fuzzed by Reddit, and may not be exact)

approved_by: Option<String>

This contains the name of the user who approved this submission. This is None unless you are a mod of the subreddit and a user has approved this post.

over_18: bool

This is true if the ‘nsfw’ option has been selected for this submission.

hidden: bool

This is true if the logged-in user has clicked ‘hide’ on this post.

num_comments: u64

The number of comment replies to this submission.

thumbnail: String

The URL to the link thumbnail. This is “self” if this is a self post, or “default” if a thumbnail is not available.

subreddit_id: String

The Reddit ID for the subreddit where this was posted, including the leading t5_.

hide_score: bool

This is true if the score is being hidden.

edited: Value

This is false if the submission is not edited and is the edit timestamp if it is edited. Access through the functions of Submission instead.

link_flair_css_class: Option<String>

The CSS class set for the link’s flair (if available), otherwise None.

author_flair_css_class: Option<String>

The CSS class set for the author’s flair (if available). If there is no flair, this is None.

downs: f64

The number of downvotes (fuzzed; see score for further explanation)

ups: f64

The number of upvotes (fuzzed; see score for further explanation)

saved: bool

True if the logged-in user has saved this submission.

removal_reason: Option<String>

The reason for the post removal, if you are a moderator and this post has been removed.

stickied: bool

This is true if this submission is stickied (an ‘annoucement’ thread)

is_self: bool

This is true if this is a self post.

permalink: String

The permanent, long link for this submission.

locked: bool

This is true if the submission has been locked by a moderator, and no replies can be made.

name: String

The full ‘Thing ID’, consisting of a ‘kind’ and a base-36 identifier. The valid kinds are:

  • t1_ - Comment
  • t2_ - Account
  • t3_ - Link
  • t4_ - Message
  • t5_ - Subreddit
  • t6_ - Award
  • t8_ - PromoCampaign
created: f64

A timestamp of the time when the post was created, in the logged-in user’s local time.

url: Option<String>

The linked URL, if this is a link post.

author_flair_text: Option<String>

The text of the author’s flair, if present. Can be an empty string if the flair is present but contains no text.

quarantine: bool

This is true if the post is from a quarantined subreddit.

title: String

The title of the post.

created_utc: f64

A timestamp of the time when the post was created, in UTC.

distinguished: Option<String>

Distinguished

visited: bool

This is true if the user has visited this link.

num_reports: Option<u64>

The number of reports, if the user is a moderator of this subreddit.

Trait Implementations

impl Debug for SubmissionsData[src]

impl<'de> Deserialize<'de> for SubmissionsData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.