pub struct UserInfo {
is_employee: bool,
awardee_karma: i64,
id: String,
verified: bool,
awarder_karma: i64,
link_karma: i64,
comment_karma: i64,
total_karma: i64,
name: String,
icon_img: Option<String>,
snoovatar_img: Option<String>,
}
Expand description
Contains some properties of a Reddit user. For some real-world examples see this u/spez profile request.
Fields§
§is_employee: bool
Is the user a Reddit employee?
awardee_karma: i64
Karma received by getting awards
id: String
User ID, eg. 1w72
verified: bool
Is the user a verified?
awarder_karma: i64
Karma given to others by giving awards
link_karma: i64
Better described as post karma
, received for others upvoting your posts
comment_karma: i64
Karma received for others upvoting your comments
total_karma: i64
Total karma, sum of all karma types. Maybe remove this field and calculate it?
name: String
Username without u/
, eg. spez
icon_img: Option<String>
Link to the user icon
snoovatar_img: Option<String>
Link to the user snoovatar, whatever that is
Implementations§
source§impl UserInfo
impl UserInfo
Auto-generated by derive_getters::Getters
.
sourcepub fn is_employee(&self) -> &bool
pub fn is_employee(&self) -> &bool
Is the user a Reddit employee?
sourcepub fn awardee_karma(&self) -> &i64
pub fn awardee_karma(&self) -> &i64
Karma received by getting awards
sourcepub fn awarder_karma(&self) -> &i64
pub fn awarder_karma(&self) -> &i64
Karma given to others by giving awards
sourcepub fn link_karma(&self) -> &i64
pub fn link_karma(&self) -> &i64
Better described as post karma
, received for others upvoting your posts
sourcepub fn comment_karma(&self) -> &i64
pub fn comment_karma(&self) -> &i64
Karma received for others upvoting your comments
sourcepub fn total_karma(&self) -> &i64
pub fn total_karma(&self) -> &i64
Total karma, sum of all karma types. Maybe remove this field and calculate it?
sourcepub fn snoovatar_img(&self) -> &Option<String>
pub fn snoovatar_img(&self) -> &Option<String>
Link to the user snoovatar, whatever that is
Trait Implementations§
source§impl<'de> Deserialize<'de> for UserInfo
impl<'de> Deserialize<'de> for UserInfo
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 UserInfo
impl PartialEq for UserInfo
impl Eq for UserInfo
impl StructuralPartialEq for UserInfo
Auto Trait Implementations§
impl Freeze for UserInfo
impl RefUnwindSafe for UserInfo
impl Send for UserInfo
impl Sync for UserInfo
impl Unpin for UserInfo
impl UnwindSafe for UserInfo
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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