pub struct Comment {Show 15 fields
pub edited: Option<f64>,
pub id: String,
pub parent_id: String,
pub link_id: String,
pub author: String,
pub ups: i64,
pub downs: i64,
pub score: i64,
pub body: String,
pub is_submitter: bool,
pub stickied: bool,
pub subreddit: String,
pub score_hidden: bool,
pub name: String,
pub replies: Listing<Comment>,
}Expand description
A struct representing a reddit comment. Does not contain all fields possible in a comment yet.
Fields§
§edited: Option<f64>The amount of seconds since the comment has been edited, if it has been.
id: StringThe id of the comment
parent_id: StringThe id of the comments parent, can be either t1 or t3
link_id: StringThe link that the comment is present in
The username of the author of the comment
ups: i64The amount of upvotes the comment has recieved
downs: i64The amount of downvotes the comment has recieved
score: i64The score of the comment (ups - downs)
body: StringThe text of the comment
is_submitter: boolWhether the comment was submitted by the same user that submitted the post (the author is OP or not)
stickied: boolWhether the comment is stickied in the thread or not
subreddit: StringThe subreddit the comment was posted in
Whether the score of the comment is hidden
name: StringThe fullname of the comment (includes the t1_ prefix)
replies: Listing<Comment>A listing of replies to this comment
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnsafeUnpin for Comment
impl UnwindSafe for Comment
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§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