Loading CHANGELOG.next.toml +6 −0 Original line number Diff line number Diff line Loading @@ -74,3 +74,9 @@ message = "Add support for omitting session token in canonical requests for SigV references = ["smithy-rs#2473"] meta = { "breaking" = false, "tada" = false, "bug" = false } author = "martinjlowm" [[aws-sdk-rust]] message = "Add `into_segments` method to `AggregatedBytes`, for zero-copy conversions." references = ["smithy-rs#2525"] meta = { "breaking" = false, "tada" = false, "bug" = false } author = "parker-timmerman" rust-runtime/aws-smithy-http/src/byte_stream.rs +5 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,11 @@ impl AggregatedBytes { self.0.copy_to_bytes(self.0.remaining()) } /// Convert this buffer into an [`Iterator`] of underlying non-contiguous segments of [`Bytes`] pub fn into_segments(self) -> impl Iterator<Item = Bytes> { self.0.into_inner().into_iter() } /// Convert this buffer into a `Vec<u8>` pub fn to_vec(self) -> Vec<u8> { self.0 Loading Loading
CHANGELOG.next.toml +6 −0 Original line number Diff line number Diff line Loading @@ -74,3 +74,9 @@ message = "Add support for omitting session token in canonical requests for SigV references = ["smithy-rs#2473"] meta = { "breaking" = false, "tada" = false, "bug" = false } author = "martinjlowm" [[aws-sdk-rust]] message = "Add `into_segments` method to `AggregatedBytes`, for zero-copy conversions." references = ["smithy-rs#2525"] meta = { "breaking" = false, "tada" = false, "bug" = false } author = "parker-timmerman"
rust-runtime/aws-smithy-http/src/byte_stream.rs +5 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,11 @@ impl AggregatedBytes { self.0.copy_to_bytes(self.0.remaining()) } /// Convert this buffer into an [`Iterator`] of underlying non-contiguous segments of [`Bytes`] pub fn into_segments(self) -> impl Iterator<Item = Bytes> { self.0.into_inner().into_iter() } /// Convert this buffer into a `Vec<u8>` pub fn to_vec(self) -> Vec<u8> { self.0 Loading