Skip to content

Commit 30e1b58

Browse files
authored
fix: Add streaming type re-exports to aws-smithy-legacy-http (#4572)
2 parents 6f162b0 + d3b815d commit 30e1b58

4 files changed

Lines changed: 25 additions & 2 deletions

File tree

.changelog/1773867889.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
applies_to:
3+
- client
4+
- aws-sdk-rust
5+
authors:
6+
- jlizen
7+
references:
8+
- smithy-rs#4431
9+
breaking: false
10+
new_feature: false
11+
bug_fix: true
12+
---
13+
Add missing `EventOrInitial`, `EventOrInitialMarshaller`, and `EventStreamSender::into_inner` to `aws-smithy-legacy-http` event_stream module, fixing compilation failures in generated SDKs that reference these types.

rust-runtime/aws-smithy-legacy-http/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-smithy-legacy-http"
3-
version = "0.62.13"
3+
version = "0.62.14"
44
authors = [
55
"AWS Rust SDK Team <[email protected]>",
66
"Russell Cohen <[email protected]>",
@@ -12,11 +12,12 @@ repository = "https://github.com/smithy-lang/smithy-rs"
1212
rust-version = "1.91.1"
1313

1414
[features]
15-
event-stream = ["aws-smithy-eventstream"]
15+
event-stream = ["aws-smithy-eventstream", "aws-smithy-http/event-stream"]
1616
rt-tokio = ["aws-smithy-types/rt-tokio"]
1717

1818
[dependencies]
1919
aws-smithy-eventstream = { path = "../aws-smithy-eventstream", optional = true }
20+
aws-smithy-http = { path = "../aws-smithy-http", optional = true }
2021
aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["client", "http-02x"] }
2122
aws-smithy-types = { path = "../aws-smithy-types", features = ["byte-stream-poll-next", "http-body-0-4-x"] }
2223
bytes = "1.11.1"

rust-runtime/aws-smithy-legacy-http/src/event_stream.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ pub type BoxError = Box<dyn StdError + Send + Sync + 'static>;
1616
#[doc(inline)]
1717
pub use sender::{EventStreamSender, MessageStreamAdapter, MessageStreamError};
1818

19+
#[doc(inline)]
20+
pub use aws_smithy_http::event_stream::{EventOrInitial, EventOrInitialMarshaller};
21+
1922
#[doc(inline)]
2023
pub use receiver::{InitialMessageType, Receiver, ReceiverError};

rust-runtime/aws-smithy-legacy-http/src/event_stream/sender.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ impl<T, E: StdError + Send + Sync + 'static> EventStreamSender<T, E> {
4747
) -> MessageStreamAdapter<T, E> {
4848
MessageStreamAdapter::new(marshaller, error_marshaller, signer, self.input_stream)
4949
}
50+
51+
/// Extract the inner stream. This is used internally for composing streams.
52+
#[doc(hidden)]
53+
pub fn into_inner(self) -> Pin<Box<dyn Stream<Item = Result<T, E>> + Send + Sync>> {
54+
self.input_stream
55+
}
5056
}
5157

5258
impl<T, E, S> From<S> for EventStreamSender<T, E>

0 commit comments

Comments
 (0)