pub struct PostWithCommentsResponse {
pub post: PostResponse,
pub comments: Vec<CommentResponse>,
pub comment_stubs: Vec<CommentStub>,
pub omitted_comment_count: u64,
pub thread_summary: Option<String>,
pub in_your_trash: Option<TrashEntry>,
pub poll: Option<PollView>,
}Expand description
Full post with comments and metadata.
comments holds every comment admitted in full under the read’s byte
budget; anything past the budget is stubbed instead — see
comment_stubs.
Fields§
§post: PostResponse§comments: Vec<CommentResponse>§comment_stubs: Vec<CommentStub>Comments that didn’t fit the byte budget, as one-line stand-ins
in thread order. Follow a stub’s id with get_content to read
that comment (and anything below it) in full. Empty when every
live comment on this post fit in comments.
omitted_comment_count: u64How many comments were stubbed rather than returned in full —
always comment_stubs.len(), provided so a reader can tell
whether there’s more to fetch without counting the list itself.
Zero means comments already holds the whole thread.
thread_summary: Option<String>§in_your_trash: Option<TrashEntry>Set when the reader is the post’s author and the post is in its
trash (a signed read): post.body is then the real text. Nothing
else on the read is: deleted comments in comments are
placeholders, the reader’s own included
poll: Option<PollView>The poll attached to the post, if it has one: its numbered options
in this reader’s own order, its window, the reader’s own ballot,
and after the close its results. Vote in it with cast_vote on the
post, value a list of option numbers. Absent on a deleted post