smithy-rs/rust-runtime
ysaito1001 f9c05262e0
Avoid exposing `aws_smithy_http::event_stream::receiver::Receiver` in SDK's public API (#3114)
## 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._
2023-11-07 02:33:01 +00:00
..
aws-smithy-async Minimum throughput body timeouts Pt.1 (#3068) 2023-10-26 20:10:24 +00:00
aws-smithy-checksums Re-point those using `ByteStream` and `SdkBody` to smithy-types (#3076) 2023-10-19 20:15:32 +00:00
aws-smithy-client Remove remaining middleware code (#3038) 2023-10-09 17:13:22 +00:00
aws-smithy-eventstream Move `Message`, `Header`, `HeaderValue`, and `StrBytes` from `aws-smithy-eventstream` to `aws-smithy-types` (#3139) 2023-11-06 20:00:31 +00:00
aws-smithy-http Avoid exposing `aws_smithy_http::event_stream::receiver::Receiver` in SDK's public API (#3114) 2023-11-07 02:33:01 +00:00
aws-smithy-http-auth Remove remaining middleware code (#3038) 2023-10-09 17:13:22 +00:00
aws-smithy-http-server Allow server decorators to inject methods on config (#3111) 2023-10-31 16:10:09 +00:00
aws-smithy-http-server-python Avoid making `FsBuilder` aware of http-body version at interface level (#3101) 2023-10-27 21:04:39 +00:00
aws-smithy-http-server-typescript Initial implementation of Typescript server bindings (#2277) 2023-04-06 15:27:17 +00:00
aws-smithy-http-tower Remove remaining middleware code (#3038) 2023-10-09 17:13:22 +00:00
aws-smithy-json Update MSRV to 1.66.1 (#2468) 2023-03-16 21:58:14 +00:00
aws-smithy-protocol-test Move http types out of client and split headers out of request (#3138) 2023-11-02 17:48:31 +00:00
aws-smithy-query Update MSRV to 1.66.1 (#2468) 2023-03-16 21:58:14 +00:00
aws-smithy-runtime Move http types out of client and split headers out of request (#3138) 2023-11-02 17:48:31 +00:00
aws-smithy-runtime-api Re-export generic default (#3144) 2023-11-02 20:32:01 +00:00
aws-smithy-types Avoid exposing `aws_smithy_http::event_stream::receiver::Receiver` in SDK's public API (#3114) 2023-11-07 02:33:01 +00:00
aws-smithy-types-convert Fix chrono deprecation (#2956) 2023-08-29 14:48:29 +00:00
aws-smithy-xml Remove third party types from public APIs (#2845) 2023-07-14 17:36:17 +00:00
inlineable Avoid exposing `aws_smithy_http::event_stream::receiver::Receiver` in SDK's public API (#3114) 2023-11-07 02:33:01 +00:00
.gitignore Partial HTTP protocol implementation (#1) 2020-10-29 15:49:22 -04:00
Cargo.toml Minimum throughput body timeouts Pt.1 (#3068) 2023-10-26 20:10:24 +00:00
build.gradle.kts Reduce Docker image rebuilds (#2269) 2023-02-01 18:41:31 +00:00
clippy.toml Add clippy.toml with forbidden methods & fix SystemTime usages (#2882) 2023-07-28 17:16:44 +00:00