Struct rmoods_backend::reddit::model::subreddit_info::SubredditInfo
source · pub struct SubredditInfo {}
Expand description
Reddit subreddit data https://www.reddit.com/r/Polska/about.json
Fields§
§display_name: String
eg. Polska
title: String
tagline, eg. “Polski Subreddit”
primary_color: String
Primary color of the subreddit, eg. #0079d3
key_color: String
Secondary color of the subreddit, eg. #ff4500
active_user_count: u32
Number of active users
subscribers: u32
Number of subscribers
name: String
Fullname, eg. t5_2qh3s
public_description: String
Description of the subreddit
community_icon: String
Subreddit logo, link needs to be parsed to get the actual image
Banner background image, link needs to be parsed to get the actual image
created_utc: f32
UNIX timestamp of the subreddit creation
id: String
Fullname of the subreddit creator, eg. t2_1w72
lang: String
Language of the subreddit, eg. pl
over18: bool
Is the subreddit NSFW?
This is inconsistent with the over_18
field in RedditPost. THIS IS INTENTED AND CORRECT.
Implementations§
source§impl SubredditInfo
impl SubredditInfo
Auto-generated by derive_getters::Getters
.
sourcepub fn display_name(&self) -> &String
pub fn display_name(&self) -> &String
eg. Polska
sourcepub fn primary_color(&self) -> &String
pub fn primary_color(&self) -> &String
Primary color of the subreddit, eg. #0079d3
sourcepub fn active_user_count(&self) -> &u32
pub fn active_user_count(&self) -> &u32
Number of active users
sourcepub fn subscribers(&self) -> &u32
pub fn subscribers(&self) -> &u32
Number of subscribers
sourcepub fn public_description(&self) -> &String
pub fn public_description(&self) -> &String
Description of the subreddit
sourcepub fn community_icon(&self) -> &String
pub fn community_icon(&self) -> &String
Subreddit logo, link needs to be parsed to get the actual image
Banner background image, link needs to be parsed to get the actual image
sourcepub fn created_utc(&self) -> &f32
pub fn created_utc(&self) -> &f32
UNIX timestamp of the subreddit creation
Trait Implementations§
source§impl Clone for SubredditInfo
impl Clone for SubredditInfo
source§fn clone(&self) -> SubredditInfo
fn clone(&self) -> SubredditInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SubredditInfo
impl Debug for SubredditInfo
source§impl<'de> Deserialize<'de> for SubredditInfo
impl<'de> Deserialize<'de> for SubredditInfo
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>,
source§impl PartialEq for SubredditInfo
impl PartialEq for SubredditInfo
source§fn eq(&self, other: &SubredditInfo) -> bool
fn eq(&self, other: &SubredditInfo) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SubredditInfo
impl Serialize for SubredditInfo
impl StructuralPartialEq for SubredditInfo
Auto Trait Implementations§
impl Freeze for SubredditInfo
impl RefUnwindSafe for SubredditInfo
impl Send for SubredditInfo
impl Sync for SubredditInfo
impl Unpin for SubredditInfo
impl UnwindSafe for SubredditInfo
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more