pub struct Comment {Show 16 fields
pub comment_id: u32,
pub commentable_id: u32,
pub commentable_type: String,
pub created_at: OffsetDateTime,
pub deleted_at: Option<OffsetDateTime>,
pub edited_at: Option<OffsetDateTime>,
pub edited_by_id: Option<u32>,
pub legacy_name: Option<Username>,
pub message: Option<String>,
pub message_html: Option<String>,
pub parent_id: Option<u32>,
pub pinned: bool,
pub replies_count: u32,
pub updated_at: OffsetDateTime,
pub user_id: Option<u32>,
pub votes_count: u32,
}
Expand description
Represents an single comment.
Fields§
§comment_id: u32
the ID of the comment
commentable_id: u32
ID of the object the comment is attached to
commentable_type: String
type of object the comment is attached to
created_at: OffsetDateTime
ISO 8601 date
deleted_at: Option<OffsetDateTime>
ISO 8601 date if the comment was deleted; None
, otherwise
edited_at: Option<OffsetDateTime>
ISO 8601 date if the comment was edited; None
, otherwise
edited_by_id: Option<u32>
user id of the user that edited the post; None
, otherwise
legacy_name: Option<Username>
username displayed on legacy comments
message: Option<String>
markdown of the comment’s content
message_html: Option<String>
html version of the comment’s content
parent_id: Option<u32>
ID of the comment’s parent
pinned: bool
Pin status of the comment
replies_count: u32
number of replies to the comment
updated_at: OffsetDateTime
ISO 8601 date
user_id: Option<u32>
user ID of the poster
votes_count: u32
number of votes
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Comment
impl<'de> Deserialize<'de> for Comment
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Comment> for Comment
impl PartialEq<Comment> for Comment
impl Eq for Comment
Auto Trait Implementations§
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin 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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.