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

pub struct SubmissionsData {
Show fields 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>,
}
Expand description

SubmissionsData

Fields

domain: String
Expand description

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>
Expand description

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
Expand description

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

selftext_html: Option<String>
Expand description

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

selftext: String
Expand description

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>
Expand description

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>
Expand description

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>
Expand description

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

id: String
Expand description

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

gilded: u64
Expand description

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

archived: bool
Expand description

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

clicked: bool
Expand description

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

author: String
Expand description

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

score: f64
Expand description

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>
Expand description

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
Expand description

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

hidden: bool
Expand description

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

num_comments: u64
Expand description

The number of comment replies to this submission.

thumbnail: String
Expand description

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
Expand description

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

hide_score: bool
Expand description

This is true if the score is being hidden.

edited: Value
Expand description

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>
Expand description

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

author_flair_css_class: Option<String>
Expand description

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

downs: f64
Expand description

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

ups: f64
Expand description

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

saved: bool
Expand description

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

removal_reason: Option<String>
Expand description

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

stickied: bool
Expand description

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

is_self: bool
Expand description

This is true if this is a self post.

permalink: String
Expand description

The permanent, long link for this submission.

locked: bool
Expand description

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

name: String
Expand description

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
Expand description

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

url: Option<String>
Expand description

The linked URL, if this is a link post.

author_flair_text: Option<String>
Expand description

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
Expand description

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

title: String
Expand description

The title of the post.

created_utc: f64
Expand description

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

distinguished: Option<String>
Expand description

Distinguished

visited: bool
Expand description

This is true if the user has visited this link.

num_reports: Option<u64>
Expand description

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

Trait Implementations

impl Debug for SubmissionsData[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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