smithy-rs/rust-runtime/aws-smithy-types-convert
Erlend Langseth 7541fe7fc8
Stream implementation (wrapper) for PaginationStream (#3299)
## Motivation and Context
https://github.com/awslabs/aws-sdk-rust/discussions/995

## Description
I tried to implement futures::Stream for a wrapper struct around
`PaginationStream`. I am unsure if I did it in the best way. After
fighting with the borrow checker for a while I decided to try
`Arc<Mutex<_>>` - is this the way to go or does there exist a better
way?
Even then, does the code look correct? I used it in my project and my
integration tests do pass but I am not 100% that these tests will catch
any error in paginated ListObjectsV2.

I would appreciate any feedback so far.

## Testing
In progress while waiting for feedback on code

## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates


_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: Russell Cohen <rcoh@amazon.com>
Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>
2024-01-02 17:36:00 +00:00
..
src Stream implementation (wrapper) for PaginationStream (#3299) 2024-01-02 17:36:00 +00:00
Cargo.toml Stream implementation (wrapper) for PaginationStream (#3299) 2024-01-02 17:36:00 +00:00
LICENSE Relegate `chrono` to an optional feature in a new conversion crate (#849) 2021-11-11 16:01:30 -08:00
README.md Scrape doc examples (#3334) 2023-12-20 18:11:43 +00:00
external-types.toml Stream implementation (wrapper) for PaginationStream (#3299) 2024-01-02 17:36:00 +00:00

README.md

aws-smithy-types-convert

This crate provides utilities for converting between the types defined in aws-smithy-types and types commonly used in other libraries.

Crate Features

By default, no features are enabled. Using the conversions requires enabling one or more features:

[dependencies]
aws-smithy-types-convert = { version = "VERSION", features = ["convert-chrono"] }

Currently, the following conversions are supported:

  • convert-chrono: Conversions between DateTime and chrono.
  • convert-time: Conversions between DateTime and time.

Note: Conversions to and from SystemTime are built into aws-smithy-types.

This crate is part of the AWS SDK for Rust and the smithy-rs code generator.