pub struct ReplyIterator<'a> { /* private fields */ }Expand description
Iterator for paginating through replies to a post.
Implementations§
Source§impl<'a> ReplyIterator<'a>
impl<'a> ReplyIterator<'a>
Sourcepub fn new(
client: &'a Client,
post_id: PostId,
options: Option<RepliesOptions>,
) -> Self
pub fn new( client: &'a Client, post_id: PostId, options: Option<RepliesOptions>, ) -> Self
Create a new reply iterator.
Sourcepub async fn next(&mut self) -> Result<Option<RepliesResponse>>
pub async fn next(&mut self) -> Result<Option<RepliesResponse>>
Fetch the next page. Returns None when exhausted.
Sourcepub async fn collect_all(&mut self) -> Result<Vec<Post>>
pub async fn collect_all(&mut self) -> Result<Vec<Post>>
Collect all remaining pages into a single Vec<Post>.
Auto Trait Implementations§
impl<'a> Freeze for ReplyIterator<'a>
impl<'a> !RefUnwindSafe for ReplyIterator<'a>
impl<'a> Send for ReplyIterator<'a>
impl<'a> Sync for ReplyIterator<'a>
impl<'a> Unpin for ReplyIterator<'a>
impl<'a> UnsafeUnpin for ReplyIterator<'a>
impl<'a> !UnwindSafe for ReplyIterator<'a>
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