Add support for Paginators (#1006)
* Add Support for Paginators This commit adds pagination support for both clients. It does this via the `FnStream` abstraction which combines a rendezvous-channel with a closure to produce a stream. When the stream is polled, the underlying closure is polled to advance the computation which then pushes data into the channel. Two paginators are generated: 1. `.paginate()` which produces a stream of `Result<Page, Err>` 2. `.paginate().items()` which produces a stream of `Result<Item, Err>` where items are flattened from the individual pages. This uses `TryFlatMap` to support conveniently generating a flat page iterator. In addition, docs are generated to point customers towards the paginators. * Add RFC, more tests * backout unrelated changes * Fix paginators for glacier * Fix clippy error * Add test for paginators that point to maps & fix apigateway paginator * Fix docs * remove extraeneous println * Fix DynamoDB examples * Disallow paginating operations with the idempotency token trait * Apply suggestions from code review misc typos / cleanups Co-authored-by:Zelda Hessler <zhessler@amazon.com> * CR feedback * Fix typo * Update changelog * Apply suggestions from code review Co-authored-by:
John DiSanti <jdisanti@amazon.com> * CR feedback round 1 * Rename paginate to into_paginator() * update pr bot comment Co-authored-by:
Zelda Hessler <zhessler@amazon.com> Co-authored-by:
John DiSanti <jdisanti@amazon.com>
Loading
Please register or sign in to comment