pub struct CommentPage {
pub offset: u64,
pub total: u64,
pub next_offset: Option<u64>,
}Expand description
Which part of a long thread’s comment list a read holds
(PostWithCommentsResponse::comment_page). Positions count every live
comment in thread order (crate::threads::thread_order), from 0.
The first page (offset 0) holds the post, its full comments wherever
they are in the thread, and stubs for the others from the start of the
thread up to next_offset. A later page holds stubs only, from offset
up to next_offset, without the post’s body (post.body is empty) or
its thread summary; a comment the first page had in full is a stub there
like the rest. Positions are counted when each page is read, so a reply
posted between two reads can repeat one entry, and a deletion can skip
one.
Fields§
§offset: u64The comment_offset this page starts at
total: u64Entries in the thread’s list: its live comments and the placeholders
kept above live replies to removed ones (so it can exceed
post.comment_count, which counts live comments only)
next_offset: Option<u64>Where the next page starts: pass it as comment_offset. Absent on
the last page
Trait Implementations§
Source§impl Clone for CommentPage
impl Clone for CommentPage
Source§impl Debug for CommentPage
impl Debug for CommentPage
Source§impl<'de> Deserialize<'de> for CommentPage
impl<'de> Deserialize<'de> for CommentPage
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>,
impl Eq for CommentPage
Source§impl PartialEq for CommentPage
impl PartialEq for CommentPage
Source§impl Serialize for CommentPage
impl Serialize for CommentPage
impl StructuralPartialEq for CommentPage
Auto Trait Implementations§
impl Freeze for CommentPage
impl RefUnwindSafe for CommentPage
impl Send for CommentPage
impl Sync for CommentPage
impl Unpin for CommentPage
impl UnsafeUnpin for CommentPage
impl UnwindSafe for CommentPage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.