mirror of https://github.com/smithy-lang/smithy-rs
f9c05262e0
## Motivation and Context Implements #3100 ## Description Currently, we expose `aws_smithy_http::event_stream::Receiver` in generated SDKs, as shown in the following S3's example (see[ a generated diff](https://d2luzm2xt3nokh.cloudfront.net/codegen-diff/cc303ab1a07693ab02d5ec4f06101b628d1dbabe/1aa6a8da7d2b7669ba3ab7179a1fd72aadc03162/aws-sdk-ignore-whitespace/index.html) for `tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/select_object_content/_select_object_content_output.rs`): ``` pub struct SelectObjectContentOutput { <p>The array of results.</p> pub payload: ::aws_smithy_http::event_stream::Receiver< crate::types::SelectObjectContentEventStream, crate::types::error::SelectObjectContentEventStreamError, >, ... ``` This PR wraps `Receiver` in a new-type, called `EventReceiver`, which then supports `pub async fn recv` method whose signature is the same as `aws_smithy_http::event_stream::Receiver::recv`. ## Testing Relied on existing tests (e.g. `s3` and `transcribestreaming` integration tests cover uses cases affected by this change). ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK 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._ |
||
---|---|---|
.. | ||
aws-smithy-async | ||
aws-smithy-checksums | ||
aws-smithy-client | ||
aws-smithy-eventstream | ||
aws-smithy-http | ||
aws-smithy-http-auth | ||
aws-smithy-http-server | ||
aws-smithy-http-server-python | ||
aws-smithy-http-server-typescript | ||
aws-smithy-http-tower | ||
aws-smithy-json | ||
aws-smithy-protocol-test | ||
aws-smithy-query | ||
aws-smithy-runtime | ||
aws-smithy-runtime-api | ||
aws-smithy-types | ||
aws-smithy-types-convert | ||
aws-smithy-xml | ||
inlineable | ||
.gitignore | ||
Cargo.toml | ||
build.gradle.kts | ||
clippy.toml |