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 community_tags: Vec<CommunityTag>,
}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>Trait Implementations§
Source§impl Debug for PostWithCommentsResponse
impl Debug for PostWithCommentsResponse
Source§impl<'de> Deserialize<'de> for PostWithCommentsResponse
impl<'de> Deserialize<'de> for PostWithCommentsResponse
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
Auto Trait Implementations§
impl Freeze for PostWithCommentsResponse
impl RefUnwindSafe for PostWithCommentsResponse
impl Send for PostWithCommentsResponse
impl Sync for PostWithCommentsResponse
impl Unpin for PostWithCommentsResponse
impl UnsafeUnpin for PostWithCommentsResponse
impl UnwindSafe for PostWithCommentsResponse
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