Skip to content

Commit

Permalink
[smithy-rs] Move Message, Header, HeaderValue, and StrBytes f…
Browse files Browse the repository at this point in the history
…rom `aws-smithy-eventstream` to `aws-smithy-types` (#3139)

## Motivation and Context
Fixes the following statement in
smithy-lang/smithy-rs#3114

> A notable breaking change is the error type of the new recv method.
Previously, it was [SdkError<E,
RawMessage>>](https://docs.rs/aws-smithy-http/0.57.0/aws_smithy_http/event_stream/struct.Receiver.html#method.recv)
but it is now a BoxError. This means that upon an event receive error,
customers can only show what the error is, but not match on it and take
some actions.

so that the `recv` method on a new-type wrapper
`aws_smithy_http::event_stream::Receiver` can expose `SdkError<E,
RawMessage>>` in public API. It is the responsibility of the above PR to
move
[RawMessage](https://github.com/awslabs/smithy-rs/blob/c7f0d5dc33937d65841d74b5b828cc77ed1d2db4/rust-runtime/aws-smithy-http/src/event_stream/receiver.rs#L92-L98)
from `aws-smithy-http` to `aws-smithy-types` but doing so first requires
`Message` to be moved to `aws-smithy-types`, hence this PR.

## Description
Moving `Message` to `aws-smithy-types` also requires moving the types it
depends upon, namely `Header`, `HederValue`, and `StrBytes`. However,
their serialization/deserialization methods (`read_from` and `write_to`)
remain in `aws-smithy-eventstream` and they are converted to free
functions, with the aim of moving things as minimally as possible.

`aws-smithy-eventstream` has fuzz testing. It previously implemented the
`Arbitrary` trait for moved types, but since they are now in
`aws-smithy-types`, we need to have newtypes for them to enable the
trait due to the orphan rules. A newly added module
`aws-smithy-eventstream::arbitrary` is exactly for that purpose.

## Testing
Relied on the existing tests.

## 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

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
ysaito1001 authored and aws-sdk-rust-ci committed Nov 16, 2023
1 parent 257ca4c commit 4d454ab
Show file tree
Hide file tree
Showing 738 changed files with 2,409 additions and 863 deletions.
3 changes: 3 additions & 0 deletions sdk/accessanalyzer/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/accessanalyzer/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/account/src/primitives.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/account/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/acm/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/acm/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/acmpca/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/acmpca/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/alexaforbusiness/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/alexaforbusiness/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/amp/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/amp/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/amplify/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/amplify/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/amplifybackend/src/primitives.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/amplifybackend/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/amplifyuibuilder/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/amplifyuibuilder/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/apigateway/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/apigateway/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/apigatewaymanagement/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;
1 change: 1 addition & 0 deletions sdk/apigatewaymanagement/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/apigatewayv2/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/apigatewayv2/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appconfig/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/appconfig/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appconfigdata/src/primitives.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use ::aws_smithy_types::Blob;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/appconfigdata/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appfabric/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/appfabric/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appflow/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/appflow/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appintegrations/src/primitives.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;
1 change: 1 addition & 0 deletions sdk/appintegrations/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/applicationautoscaling/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/applicationautoscaling/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/applicationcostprofiler/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/applicationcostprofiler/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/applicationdiscovery/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/applicationdiscovery/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/applicationinsights/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/applicationinsights/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appmesh/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/appmesh/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/apprunner/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/apprunner/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appstream/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/appstream/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/appsync/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::Blob;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/appsync/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/arczonalshift/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/arczonalshift/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/athena/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/athena/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/auditmanager/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/auditmanager/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/autoscaling/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/autoscaling/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
3 changes: 3 additions & 0 deletions sdk/autoscalingplans/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
pub use ::aws_smithy_types::DateTime;

/// Event stream related primitives such as `Message` or `Header`.
pub mod event_stream;

/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
/// the crate
///
Expand Down
1 change: 1 addition & 0 deletions sdk/autoscalingplans/src/primitives/event_stream.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
6 changes: 4 additions & 2 deletions sdk/aws-runtime/src/auth/sigv4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ mod event_stream {
use aws_sigv4::event_stream::{sign_empty_message, sign_message};
use aws_sigv4::sign::v4;
use aws_smithy_async::time::SharedTimeSource;
use aws_smithy_eventstream::frame::{Message, SignMessage, SignMessageError};
use aws_smithy_eventstream::frame::{SignMessage, SignMessageError};
use aws_smithy_runtime_api::client::identity::Identity;
use aws_smithy_types::event_stream::Message;
use aws_types::region::SigningRegion;
use aws_types::SigningName;

Expand Down Expand Up @@ -293,7 +294,8 @@ mod event_stream {
use crate::auth::sigv4::event_stream::SigV4MessageSigner;
use aws_credential_types::Credentials;
use aws_smithy_async::time::SharedTimeSource;
use aws_smithy_eventstream::frame::{HeaderValue, Message, SignMessage};
use aws_smithy_eventstream::frame::SignMessage;
use aws_smithy_types::event_stream::{HeaderValue, Message};

use aws_types::region::Region;
use aws_types::region::SigningRegion;
Expand Down
4 changes: 4 additions & 0 deletions sdk/aws-sigv4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ path = "../aws-smithy-runtime-api"
features = ["client"]
version = "0.57.1"

[dependencies.aws-smithy-types]
path = "../aws-smithy-types"
version = "0.57.1"

[dependencies.form_urlencoded]
version = "1.0"
optional = true
Expand Down
2 changes: 1 addition & 1 deletion sdk/aws-sigv4/external-types.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ allowed_external_types = [
# TODO(refactorHttp): Remove this and remove the signing helpers
"http::request::Request",
# TODO(https://github.com/awslabs/smithy-rs/issues/1193): Once tooling permits it, only allow the following types in the `event-stream` feature
"aws_smithy_eventstream::frame::Message",
"aws_smithy_types::event_stream::Message",
"aws_smithy_runtime_api::client::identity::Identity"
]
Loading

0 comments on commit 4d454ab

Please sign in to comment.