Struct roux::subreddit::responses::submissions::SubmissionsData [−][src]
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
.
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.
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
.
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.
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for SubmissionsData
impl Send for SubmissionsData
impl Sync for SubmissionsData
impl Unpin for SubmissionsData
impl UnwindSafe for SubmissionsData
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,