pub struct CommentBundle {
pub commentable_meta: Vec<CommentableMeta>,
pub comments: Vec<Comment>,
pub has_more_id: Option<u32>,
pub included_comments: Vec<Comment>,
pub pinned_comments: Option<Vec<Comment>>,
pub sort: CommentSort,
pub top_level_count: Option<u32>,
pub total: Option<u32>,
pub user_follow: bool,
pub user_votes: Vec<u32>,
pub users: Vec<User>,
/* private fields */
}Expand description
Comments and related data.
Fields§
§commentable_meta: Vec<CommentableMeta>ID of the object the comment is attached to
comments: Vec<Comment>List of comments ordered according to sort
has_more_id: Option<u32>§included_comments: Vec<Comment>Related comments; e.g. parent comments and nested replies
pinned_comments: Option<Vec<Comment>>Pinned comments
sort: CommentSortorder of comments
top_level_count: Option<u32>Number of comments at the top level. Not returned for replies.
total: Option<u32>Total number of comments. Not retuned for replies.
user_follow: boolis the current user watching the comment thread?
user_votes: Vec<u32>IDs of the comments in the bundle the current user has upvoted
users: Vec<User>List of users related to the comments
Implementations§
Trait Implementations§
Source§impl Clone for CommentBundle
impl Clone for CommentBundle
Source§fn clone(&self) -> CommentBundle
fn clone(&self) -> CommentBundle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommentBundle
impl Debug for CommentBundle
Source§impl<'de> Deserialize<'de> for CommentBundle
impl<'de> Deserialize<'de> for CommentBundle
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 for CommentBundle
impl PartialEq for CommentBundle
Source§impl Serialize for CommentBundle
impl Serialize for CommentBundle
impl StructuralPartialEq for CommentBundle
Auto Trait Implementations§
impl Freeze for CommentBundle
impl RefUnwindSafe for CommentBundle
impl Send for CommentBundle
impl Sync for CommentBundle
impl Unpin for CommentBundle
impl UnwindSafe for CommentBundle
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