Struct rosu_v2::model::comments::CommentBundle
source · 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<UserCompact>,
/* 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: CommentSort
order 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: bool
is 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<UserCompact>
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 copy 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<CommentBundle> for CommentBundle
impl PartialEq<CommentBundle> for CommentBundle
source§fn eq(&self, other: &CommentBundle) -> bool
fn eq(&self, other: &CommentBundle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CommentBundle
Auto Trait Implementations§
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