File tree 2 files changed +11
-0
lines changed
rust-runtime/aws-smithy-http/src 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -74,3 +74,9 @@ message = "Add support for omitting session token in canonical requests for SigV
74
74
references = [" smithy-rs#2473" ]
75
75
meta = { "breaking" = false , "tada" = false , "bug" = false }
76
76
author = " martinjlowm"
77
+
78
+ [[aws-sdk-rust ]]
79
+ message = " Add `into_segments` method to `AggregatedBytes`, for zero-copy conversions."
80
+ references = [" smithy-rs#2525" ]
81
+ meta = { "breaking" = false , "tada" = false , "bug" = false }
82
+ author = " parker-timmerman"
Original file line number Diff line number Diff line change @@ -477,6 +477,11 @@ impl AggregatedBytes {
477
477
self . 0 . copy_to_bytes ( self . 0 . remaining ( ) )
478
478
}
479
479
480
+ /// Convert this buffer into an [`Iterator`] of underlying non-contiguous segments of [`Bytes`]
481
+ pub fn into_segments ( self ) -> impl Iterator < Item = Bytes > {
482
+ self . 0 . into_inner ( ) . into_iter ( )
483
+ }
484
+
480
485
/// Convert this buffer into a `Vec<u8>`
481
486
pub fn to_vec ( self ) -> Vec < u8 > {
482
487
self . 0
You can’t perform that action at this time.
0 commit comments