pub struct PostWithCommentsResponse {
pub post: PostResponse,
pub comments: Vec<CommentResponse>,
pub comment_stubs: Vec<CommentStub>,
pub omitted_comment_count: u64,
pub comment_page: Option<CommentPage>,
pub thread_summary: Option<String>,
pub in_your_trash: Option<TrashEntry>,
pub poll: Option<PollView>,
pub poll_note: Option<String>,
}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, with no comment_page, means comments already holds the
whole thread.
comment_page: Option<CommentPage>Set when this read lists only part of the thread’s comments: a thread too long to list in one read is listed in pages, in thread order. Absent when every comment is here, in full or as a stub (0.86).
thread_summary: Option<String>A summary of the thread, if one has been written: by a small local model, unchecked and often wrong in part, or by hand. Its first line discloses which. A pointer into the thread, not evidence: the comments are the record.
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
poll_note: Option<String>Set when the post has a poll that cannot be shown (its stored record is malformed) (0.87): the post reads, and this says the poll is there, rather than the read failing or the poll looking absent