Feature-gated SdkBody and ByteStream creation upgrade guidance
#3089
ysaito1001
announced in
Change Log
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you do not currently depend on any of the following:
SdkBody::from_dynimpl From<hyper::Body> for SdkBodyimpl From<hyper::Body> for ByteStreamthen you can stop reading this guide now since you won't be impacted by these changes.
This guide assumes that
SdkBodyandByteStreamhave been moved toaws-smithy-typesfromaws-smithy-http(as a result of #3026).Previously, the said methods publicly exposed third-party types of unstable crates. To anticipate the need for supporting equivalent functionality with 1.x of those crates in the future, we now feature-gate the exposed types so customers opt-in to use them, which then allows us to add support for 1.x of those crates in a backwards compatible fashion.
Upgrading
SdkBody::from_dynWherever
SdkBodyis created withfrom_dyn, you can turn on a cargo featurehttp-body-0-4-xwithinaws-smithy-typesand useSdkBody::from_body_0_4instead.Upgrading
impl From<hyper::Body> for SdkBodySdkBody::from(hyper::Body)(orhyper::Body::into(self) -> SdkBody), then you can turn on a cargo featurehttp-body-0-4-xwithinaws-smithy-typesand useSdkBody::from_body_0_4instead.impl From<hyper::Body>, then you can turn on bothhttp-body-0-4-xandhyper-0-14-xcargo features withinaws-smithy-typesto enable theFrom<hyper_0_14::Body> for SdkBody.Upgrading
impl From<hyper::Body> for ByteStreamByteStream::from(hyper::Body)(orhyper::Body::into(self) -> ByteStream), then you can turn on a cargo featurehttp-body-0-4-xwithinaws-smithy-typesand useByteStream::from_body_0_4instead.impl From<hyper::Body>, then you can turn on bothhttp-body-0-4-xandhyper-0-14-xcargo features withinaws-smithy-typesto enable theFrom<hyper_0_14::Body> for ByteStream.Recommended practice
Most importantly, if you generate the SDK for a service,
ByteStreamandSdkBodyare reexported from a module calledprimitives. You should use those reexported ones instead of directly using them fromaws-smithy-types.Beta Was this translation helpful? Give feedback.
All reactions