3 3 | body: &mut ::aws_smithy_types::body::SdkBody,
|
4 4 | ) -> std::result::Result<
|
5 5 | crate::event_receiver::EventReceiver<
|
6 6 | crate::types::CallAnalyticsTranscriptResultStream,
|
7 7 | crate::types::error::CallAnalyticsTranscriptResultStreamError,
|
8 8 | >,
|
9 9 | crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
|
10 10 | > {
|
11 11 | let unmarshaller = crate::event_stream_serde::CallAnalyticsTranscriptResultStreamUnmarshaller::new();
|
12 12 | let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken());
|
13 - | Ok(crate::event_receiver::EventReceiver::new(::aws_smithy_http::event_stream::Receiver::new(
|
14 - | unmarshaller,
|
15 - | body,
|
16 - | )))
|
13 + | let receiver = crate::event_receiver::EventReceiver::new(::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body));
|
14 + | Ok(receiver)
|
17 15 | }
|
18 16 |
|
19 17 | pub(crate) fn de_content_identification_type_header(
|
20 18 | header_map: &::aws_smithy_runtime_api::http::Headers,
|
21 19 | ) -> ::std::result::Result<::std::option::Option<crate::types::ContentIdentificationType>, ::aws_smithy_http::header::ParseError> {
|
22 20 | let headers = header_map.get_all("x-amzn-transcribe-content-identification-type");
|
23 21 | ::aws_smithy_http::header::one_or_none(headers)
|
24 22 | }
|
25 23 |
|
26 24 | pub(crate) fn de_content_redaction_type_header(
|
27 25 | header_map: &::aws_smithy_runtime_api::http::Headers,
|
28 26 | ) -> ::std::result::Result<::std::option::Option<crate::types::ContentRedactionType>, ::aws_smithy_http::header::ParseError> {
|
29 27 | let headers = header_map.get_all("x-amzn-transcribe-content-redaction-type");
|
30 28 | ::aws_smithy_http::header::one_or_none(headers)
|
31 29 | }
|
32 30 |
|
33 31 | pub(crate) fn de_enable_partial_results_stabilization_header(
|
34 32 | header_map: &::aws_smithy_runtime_api::http::Headers,
|
35 33 | ) -> ::std::result::Result<::std::option::Option<bool>, ::aws_smithy_http::header::ParseError> {
|
36 34 | let headers = header_map.get_all("x-amzn-transcribe-enable-partial-results-stabilization");
|
37 35 | let var_1 = ::aws_smithy_http::header::read_many_primitive::<bool>(headers)?;
|
38 36 | if var_1.len() > 1 {
|
39 37 | Err(::aws_smithy_http::header::ParseError::new(format!(
|
40 38 | "expected one item but found {}",
|
41 39 | var_1.len()
|
42 40 | )))
|
43 41 | } else {
|
44 42 | let mut var_1 = var_1;
|
45 43 | Ok(var_1.pop())
|
46 44 | }
|