id
stringlengths
22
133
text
stringlengths
40
40.2k
arch
stringclasses
1 value
syntax
stringclasses
1 value
kind
stringclasses
4 values
repo
stringclasses
27 values
path
stringlengths
5
116
license
stringclasses
6 values
commit
stringlengths
40
40
source_host
stringclasses
1 value
category
stringclasses
16 values
source_url
stringlengths
85
196
line_start
int64
1
4.28k
line_end
int64
4
4.31k
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
hyper_tls::HttpsConnector::new() } #[cfg(feature = "native-tls")] pub type NativeTls = hyper_tls::HttpsConnector<hyper::client::HttpConnector>; #[cfg(feature = "rustls")] pub type Rustls = crate::hyper_ext::Adapter<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>; } use aws_smi...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
04cf48b07ef42a258fa637da8d488a564bef049d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/04cf48b07ef42a258fa637da8d488a564bef049d/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
/// [`http::Response<SdkBody>`], most likely by modifying the provided request in place, passing it /// to the inner service, and then ultimately returning the inner service's response. /// /// With the `hyper` feature enabled, you can construct a `Client` directly from a /// [`hyper::Client`] using [`hyper_ext::Adapte...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
04cf48b07ef42a258fa637da8d488a564bef049d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/04cf48b07ef42a258fa637da8d488a564bef049d/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
} } fn check_send_sync<T: Send + Sync>(t: T) -> T { t } impl<C, M, R> Client<C, M, R> where C: bounds::SmithyConnector, M: bounds::SmithyMiddleware<C>, R: retry::NewRequestPolicy, { /// Dispatch this request to the network /// /// For ergonomics, this does not include the raw response for ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
04cf48b07ef42a258fa637da8d488a564bef049d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/04cf48b07ef42a258fa637da8d488a564bef049d/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
Retry: Send + Sync, R::Policy: bounds::SmithyRetryPolicy<O, T, E, Retry>, // This bound is not _technically_ inferred by all the previous bounds, but in practice it // is because _we_ know that there is only implementation of Service for Parsed // (ParsedResponseService), and it will app...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
04cf48b07ef42a258fa637da8d488a564bef049d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/04cf48b07ef42a258fa637da8d488a564bef049d/sdk/aws-smithy-client/src/lib.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
if let Some(metadata) = &parts.metadata { span.record("operation", &metadata.name()); span.record("service", &metadata.service()); // This will clone two `Cow::<&'static str>::Borrow`s in the vast majority of cases req.properties_mut().insert(metadata.clone()); } ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
04cf48b07ef42a258fa637da8d488a564bef049d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/04cf48b07ef42a258fa637da8d488a564bef049d/sdk/aws-smithy-client/src/lib.rs
241
292
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:8
where R::Policy: tower::retry::Policy< static_tests::ValidTestOperation, SdkSuccess<()>, SdkError<static_tests::TestOperationError>, > + Clone, { let _ = |o: static_tests::ValidTestOperation| { let _ = self.call_raw(o); ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
04cf48b07ef42a258fa637da8d488a564bef049d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/04cf48b07ef42a258fa637da8d488a564bef049d/sdk/aws-smithy-client/src/lib.rs
281
292
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:2
pub mod hyper_ext; // The types in this module are only used to write the bounds in [`Client::check`]. Customers will // not need them. But the module and its types must be public so that we can call `check` from // doc-tests. #[doc(hidden)] pub mod static_tests; pub mod never; pub mod timeout; pub use timeout::Timeo...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
305c4aa0a153737d28f3c9cbbf425e5dcd946da1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/305c4aa0a153737d28f3c9cbbf425e5dcd946da1/sdk/aws-smithy-client/src/lib.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
hyper_tls::HttpsConnector::new() } #[cfg(feature = "native-tls")] pub type NativeTls = hyper_tls::HttpsConnector<hyper::client::HttpConnector>; #[cfg(feature = "rustls")] pub type Rustls = crate::hyper_ext::Adapter<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>; } use aws_smi...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
305c4aa0a153737d28f3c9cbbf425e5dcd946da1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/305c4aa0a153737d28f3c9cbbf425e5dcd946da1/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
/// /// With the `hyper` feature enabled, you can construct a `Client` directly from a /// [`hyper::Client`] using [`hyper_ext::Adapter::builder`]. You can also enable the `rustls` or `native-tls` /// features to construct a Client against a standard HTTPS endpoint using [`Builder::rustls_connector`] and /// `Builder::...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
305c4aa0a153737d28f3c9cbbf425e5dcd946da1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/305c4aa0a153737d28f3c9cbbf425e5dcd946da1/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
fn check_send_sync<T: Send + Sync>(t: T) -> T { t } impl<C, M, R> Client<C, M, R> where C: bounds::SmithyConnector, M: bounds::SmithyMiddleware<C>, R: retry::NewRequestPolicy, { /// Dispatch this request to the network /// /// For ergonomics, this does not include the raw response for succe...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
305c4aa0a153737d28f3c9cbbf425e5dcd946da1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/305c4aa0a153737d28f3c9cbbf425e5dcd946da1/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
// This bound is not _technically_ inferred by all the previous bounds, but in practice it // is because _we_ know that there is only implementation of Service for Parsed // (ParsedResponseService), and it will apply as long as the bounds on C, M, and R hold, // and will produce (as expected) Re...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
305c4aa0a153737d28f3c9cbbf425e5dcd946da1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/305c4aa0a153737d28f3c9cbbf425e5dcd946da1/sdk/aws-smithy-client/src/lib.rs
201
250
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
static_tests::ValidTestOperation, SdkSuccess<()>, SdkError<static_tests::TestOperationError>, > + Clone, { let _ = |o: static_tests::ValidTestOperation| { let _ = self.call_raw(o); }; } }
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
305c4aa0a153737d28f3c9cbbf425e5dcd946da1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/305c4aa0a153737d28f3c9cbbf425e5dcd946da1/sdk/aws-smithy-client/src/lib.rs
241
250
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
/// /// With the `hyper` feature enabled, you can construct a `Client` directly from a /// [`hyper::Client`] using [`hyper_ext::Adapter::builder`]. You can also enable the `rustls` or `native-tls` /// features to construct a Client against a standard HTTPS endpoint using [`Builder::rustls_connector`] and /// `Builder::...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
9407b2314c6568f5e73be6951cba668511d366d5
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/9407b2314c6568f5e73be6951cba668511d366d5/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
fn check_send_sync<T: Send + Sync>(t: T) -> T { t } impl<C, M, R> Client<C, M, R> where C: bounds::SmithyConnector, M: bounds::SmithyMiddleware<C>, R: retry::NewRequestPolicy, { /// Dispatch this request to the network /// /// For ergonomics, this does not include the raw response for succe...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
9407b2314c6568f5e73be6951cba668511d366d5
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/9407b2314c6568f5e73be6951cba668511d366d5/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
// (ParsedResponseService), and it will apply as long as the bounds on C, M, and R hold, // and will produce (as expected) Response = SdkSuccess<T>, Error = SdkError<E>. But Rust // doesn't know that -- there _could_ theoretically be other implementations of Service for // Parsed that don't retu...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
9407b2314c6568f5e73be6951cba668511d366d5
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/9407b2314c6568f5e73be6951cba668511d366d5/sdk/aws-smithy-client/src/lib.rs
201
248
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:2
pub mod hyper_ext; // The types in this module are only used to write the bounds in [`Client::check`]. Customers will // not need them. But the module and its types must be public so that we can call `check` from // doc-tests. #[doc(hidden)] pub mod static_tests; pub mod never; pub mod timeout; pub use timeout::Timeo...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
d9b0e139d03bb5cdd990998dda0cf2a79f151e99
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/d9b0e139d03bb5cdd990998dda0cf2a79f151e99/sdk/aws-smithy-client/src/lib.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
#[cfg(feature = "rustls")] pub type Rustls = crate::hyper_ext::Adapter<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>; } use std::error::Error; use std::sync::Arc; use tower::{Layer, Service, ServiceBuilder, ServiceExt}; use crate::timeout::generate_timeout_service_params_from_timeout_config;...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
d9b0e139d03bb5cdd990998dda0cf2a79f151e99
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/d9b0e139d03bb5cdd990998dda0cf2a79f151e99/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
#[derive(Debug)] pub struct Client< Connector = erase::DynConnector, Middleware = erase::DynMiddleware<Connector>, RetryPolicy = retry::Standard, > { connector: Connector, middleware: Middleware, retry_policy: RetryPolicy, timeout_config: aws_smithy_types::timeout::Config, sleep_impl: Op...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
d9b0e139d03bb5cdd990998dda0cf2a79f151e99
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/d9b0e139d03bb5cdd990998dda0cf2a79f151e99/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
} impl<C, M, R> Client<C, M, R> { /// Set the client's timeout configuration. pub fn set_timeout_config(&mut self, timeout_config: aws_smithy_types::timeout::Config) { self.timeout_config = timeout_config; } /// Set the client's timeout configuration. pub fn with_timeout_config( mu...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
d9b0e139d03bb5cdd990998dda0cf2a79f151e99
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/d9b0e139d03bb5cdd990998dda0cf2a79f151e99/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
{ /// Dispatch this request to the network /// /// For ergonomics, this does not include the raw response for successful responses. To /// access the raw response use `call_raw`. pub async fn call<O, T, E, Retry>(&self, input: Operation<O, Retry>) -> Result<T, SdkError<E>> where O: Send ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
d9b0e139d03bb5cdd990998dda0cf2a79f151e99
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/d9b0e139d03bb5cdd990998dda0cf2a79f151e99/sdk/aws-smithy-client/src/lib.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
&self.timeout_config.api, self.sleep_impl.clone(), ); let svc = ServiceBuilder::new() .layer(TimeoutLayer::new(timeout_service_params.api_call)) .retry( self.retry_policy .new_request_policy(self.sleep_impl.clone()), ) ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
d9b0e139d03bb5cdd990998dda0cf2a79f151e99
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/d9b0e139d03bb5cdd990998dda0cf2a79f151e99/sdk/aws-smithy-client/src/lib.rs
241
280
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:2
pub mod hyper_ext; // The types in this module are only used to write the bounds in [`Client::check`]. Customers will // not need them. But the module and its types must be public so that we can call `check` from // doc-tests. #[doc(hidden)] pub mod static_tests; pub mod never; pub mod timeout; pub use timeout::Timeo...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
7f9cfeccad54627973c04554ca91de9529639c8a
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7f9cfeccad54627973c04554ca91de9529639c8a/sdk/aws-smithy-client/src/lib.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
#[cfg(feature = "rustls")] pub type Rustls = crate::hyper_ext::Adapter<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>; } use std::error::Error; use std::sync::Arc; use tower::{Layer, Service, ServiceBuilder, ServiceExt}; use crate::timeout::generate_timeout_service_params_from_timeout_config;...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
7f9cfeccad54627973c04554ca91de9529639c8a
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7f9cfeccad54627973c04554ca91de9529639c8a/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
#[cfg(feature = "rustls")] pub type Rustls = crate::hyper_ext::Adapter<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>; } use std::error::Error; use std::sync::Arc; use tower::{Layer, Service, ServiceBuilder, ServiceExt}; use crate::timeout::generate_timeout_service_params_from_timeout_config;...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
/// `Builder::native_tls` respectively. #[derive(Debug)] pub struct Client< Connector = erase::DynConnector, Middleware = erase::DynMiddleware<Connector>, RetryPolicy = retry::Standard, > { connector: Connector, middleware: Middleware, retry_policy: RetryPolicy, timeout_config: aws_smithy_ty...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
self } } impl<C, M, R> Client<C, M, R> { /// Set the client's timeout configuration. pub fn set_timeout_config(&mut self, timeout_config: aws_smithy_types::timeout::Config) { self.timeout_config = timeout_config; } /// Set the client's timeout configuration. pub fn with_timeout_config(...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
M: bounds::SmithyMiddleware<C>, R: retry::NewRequestPolicy, { /// Dispatch this request to the network /// /// For ergonomics, this does not include the raw response for successful responses. To /// access the raw response use `call_raw`. pub async fn call<O, T, E, Retry>(&self, input: Operation...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/lib.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
// during requests, debug log (a warning is emitted during client construction) tracing::debug!( "Client does not have a sleep implementation. Timeouts and retry \ will not work without this. {}", MISSING_SLEEP_IMPL_RECOMMENDATION ); } ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/lib.rs
241
297
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:8
static_tests::ValidTestOperation, SdkSuccess<()>, SdkError<static_tests::TestOperationError>, > + Clone, { let _ = |o: static_tests::ValidTestOperation| { let _ = self.call_raw(o); }; } } pub(crate) const MISSING_SLEEP_IMPL_RECOMMENDATION:...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/lib.rs
281
297
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! A Hyper-based Smithy service client. //! //! | Feature | Description | //! |-------------------|-------------| //! | `event-stream` | Provides Sender/Receiver implementations for Event ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
4affc2ae319f6aef20a5fa66617c6774b3a7f4ea
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/4affc2ae319f6aef20a5fa66617c6774b3a7f4ea/sdk/aws-smithy-client/src/lib.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
#[cfg(feature = "rustls")] pub type Rustls = crate::hyper_ext::Adapter<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>; } use std::error::Error; use std::sync::Arc; use tower::{Layer, Service, ServiceBuilder, ServiceExt}; use crate::timeout::generate_timeout_service_params_from_timeout_config;...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
98a7fbd654d125acb9d70ad3b38c6a8246b37273
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/98a7fbd654d125acb9d70ad3b38c6a8246b37273/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
/// `Builder::native_tls` respectively. #[derive(Debug)] pub struct Client< Connector = erase::DynConnector, Middleware = erase::DynMiddleware<Connector>, RetryPolicy = retry::Standard, > { connector: Connector, middleware: Middleware, retry_policy: RetryPolicy, timeout_config: TimeoutConfig...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
98a7fbd654d125acb9d70ad3b38c6a8246b37273
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/98a7fbd654d125acb9d70ad3b38c6a8246b37273/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
self } } impl<C, M, R> Client<C, M, R> { /// Set the client's timeout configuration. pub fn set_timeout_config(&mut self, timeout_config: TimeoutConfig) { self.timeout_config = timeout_config; } /// Set the client's timeout configuration. pub fn with_timeout_config(mut self, timeout_co...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
98a7fbd654d125acb9d70ad3b38c6a8246b37273
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/98a7fbd654d125acb9d70ad3b38c6a8246b37273/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
/// Dispatch this request to the network /// /// For ergonomics, this does not include the raw response for successful responses. To /// access the raw response use `call_raw`. pub async fn call<O, T, E, Retry>(&self, input: Operation<O, Retry>) -> Result<T, SdkError<E>> where O: Send + Sync...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
98a7fbd654d125acb9d70ad3b38c6a8246b37273
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/98a7fbd654d125acb9d70ad3b38c6a8246b37273/sdk/aws-smithy-client/src/lib.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
will not work without this. {}", MISSING_SLEEP_IMPL_RECOMMENDATION ); } let connector = self.connector.clone(); let timeout_service_params = generate_timeout_service_params_from_timeout_config( &self.timeout_config, self.sleep_impl.clone().int...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
98a7fbd654d125acb9d70ad3b38c6a8246b37273
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/98a7fbd654d125acb9d70ad3b38c6a8246b37273/sdk/aws-smithy-client/src/lib.rs
241
300
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:8
> + Clone, { let _ = |o: static_tests::ValidTestOperation| { let _ = self.call_raw(o); }; } } pub(crate) const MISSING_SLEEP_IMPL_RECOMMENDATION: &str = "If this was intentional, you can suppress this message with `Client::set_sleep_impl(None). \ Otherwise, unless you have ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
98a7fbd654d125acb9d70ad3b38c6a8246b37273
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/98a7fbd654d125acb9d70ad3b38c6a8246b37273/sdk/aws-smithy-client/src/lib.rs
281
339
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:9
} impl<T> From<Option<T>> for TriState<T> { fn from(t: Option<T>) -> Self { match t { Some(t) => TriState::Set(t), None => TriState::Disabled, } } } impl<T> From<TriState<T>> for Option<T> { fn from(t: TriState<T>) -> Self { match t { TriState::D...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
98a7fbd654d125acb9d70ad3b38c6a8246b37273
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/98a7fbd654d125acb9d70ad3b38c6a8246b37273/sdk/aws-smithy-client/src/lib.rs
321
339
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! A Hyper-based Smithy service client. //! //! | Feature | Description | //! |-------------------|-------------| //! | `event-stream` | Provides Sender/Receiver implementations for Event ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:2
// The types in this module are only used to write the bounds in [`Client::check`]. Customers will // not need them. But the module and its types must be public so that we can call `check` from // doc-tests. #[doc(hidden)] pub mod static_tests; pub mod never; pub mod timeout; pub use timeout::TimeoutLayer; /// Type a...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
pub type Rustls = crate::hyper_ext::Adapter<hyper_rustls::HttpsConnector<hyper::client::HttpConnector>>; } use std::error::Error; use std::sync::Arc; use tower::{Layer, Service, ServiceBuilder, ServiceExt}; use crate::timeout::generate_timeout_service_params_from_timeout_config; use aws_smithy_async::rt::slee...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
pub struct Client< Connector = erase::DynConnector, Middleware = erase::DynMiddleware<Connector>, RetryPolicy = retry::Standard, > { connector: Connector, middleware: Middleware, retry_policy: RetryPolicy, timeout_config: TimeoutConfig, sleep_impl: TriState<Arc<dyn AsyncSleep>>, } // Qu...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
} impl<C, M, R> Client<C, M, R> { /// Set the client's timeout configuration. pub fn set_timeout_config(&mut self, config: TimeoutConfig) { self.timeout_config = config; } /// Set the client's timeout configuration. pub fn with_timeout_config(mut self, config: TimeoutConfig) -> Self { ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
/// For ergonomics, this does not include the raw response for successful responses. To /// access the raw response use `call_raw`. pub async fn call<O, T, E, Retry>(&self, input: Operation<O, Retry>) -> Result<T, SdkError<E>> where O: Send + Sync, Retry: Send + Sync, R::Policy: boun...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
); } let connector = self.connector.clone(); let timeout_service_params = generate_timeout_service_params_from_timeout_config( &self.timeout_config, self.sleep_impl.clone().into(), ); let svc = ServiceBuilder::new() .layer(TimeoutLayer::new(t...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
241
300
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:8
let _ = |o: static_tests::ValidTestOperation| { let _ = self.call_raw(o); }; } } pub(crate) const MISSING_SLEEP_IMPL_RECOMMENDATION: &str = "If this was intentional, you can suppress this message with `Client::set_sleep_impl(None). \ Otherwise, unless you have a good reason to use the ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
281
337
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:9
impl<T> From<Option<T>> for TriState<T> { fn from(t: Option<T>) -> Self { match t { Some(t) => TriState::Set(t), None => TriState::Disabled, } } } impl<T> From<TriState<T>> for Option<T> { fn from(t: TriState<T>) -> Self { match t { TriState::Disa...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/lib.rs
321
337
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! A Hyper-based Smithy service client. #![warn( missing_debug_implementations, missing_docs, rustdoc::all, rust_2018_idioms )] pub mod bounds; pub mod erase; pub mod retry; // https:...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
35105d745c9ad8399f112b4a4868804e3b7cfcb0
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/35105d745c9ad8399f112b4a4868804e3b7cfcb0/sdk/aws-smithy-client/src/lib.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:2
/// Type aliases for standard connection types. #[cfg(feature = "hyper")] #[allow(missing_docs)] pub mod conns { #[cfg(feature = "rustls")] pub type Https = hyper_rustls::HttpsConnector<hyper::client::HttpConnector>; // Creating a `with_native_roots` HTTP client takes 300ms on OS X. Cache this so that we ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
35105d745c9ad8399f112b4a4868804e3b7cfcb0
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/35105d745c9ad8399f112b4a4868804e3b7cfcb0/sdk/aws-smithy-client/src/lib.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
use crate::timeout::generate_timeout_service_params_from_timeout_config; use aws_smithy_async::rt::sleep::{default_async_sleep, AsyncSleep}; use aws_smithy_http::body::SdkBody; use aws_smithy_http::operation::Operation; use aws_smithy_http::response::ParseHttpResponse; pub use aws_smithy_http::result::{SdkError, SdkSuc...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
35105d745c9ad8399f112b4a4868804e3b7cfcb0
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/35105d745c9ad8399f112b4a4868804e3b7cfcb0/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
timeout_config: TimeoutConfig, sleep_impl: Option<Arc<dyn AsyncSleep>>, } // Quick-create for people who just want "the default". impl<C, M> Client<C, M> where M: Default, { /// Create a Smithy client that the given connector, a middleware default, the [standard /// retry policy](crate::retry::Standard...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
35105d745c9ad8399f112b4a4868804e3b7cfcb0
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/35105d745c9ad8399f112b4a4868804e3b7cfcb0/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
/// Set the client's timeout configuration. pub fn with_timeout_config(mut self, config: TimeoutConfig) -> Self { self.set_timeout_config(config); self } /// Set the [`AsyncSleep`] function that the client will use to create things like timeout futures. pub fn set_sleep_impl(&mut self, ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
35105d745c9ad8399f112b4a4868804e3b7cfcb0
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/35105d745c9ad8399f112b4a4868804e3b7cfcb0/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
self.call_raw(input).await.map(|res| res.parsed) } /// Dispatch this request to the network /// /// The returned result contains the raw HTTP response which can be useful for debugging or /// implementing unsupported features. pub async fn call_raw<O, T, E, Retry>( &self, input:...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
35105d745c9ad8399f112b4a4868804e3b7cfcb0
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/35105d745c9ad8399f112b4a4868804e3b7cfcb0/sdk/aws-smithy-client/src/lib.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
.service(connector); check_send_sync(svc).ready().await?.call(input).await } /// Statically check the validity of a `Client` without a request to send. /// /// This will make sure that all the bounds hold that would be required by `call` and /// `call_raw` (modulo those that relate to the ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
35105d745c9ad8399f112b4a4868804e3b7cfcb0
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/35105d745c9ad8399f112b4a4868804e3b7cfcb0/sdk/aws-smithy-client/src/lib.rs
241
264
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! A Hyper-based Smithy service client. #![warn( missing_debug_implementations, missing_docs, rustdoc::all, rust_2018_idioms )] pub mod bounds; pub mod erase; pub mod retry; // https:/...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
5f4378d3e820cebbb6b7e7413d4592c7d5441559
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/5f4378d3e820cebbb6b7e7413d4592c7d5441559/sdk/aws-smithy-client/src/lib.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:2
/// Type aliases for standard connection types. #[cfg(feature = "hyper")] #[allow(missing_docs)] pub mod conns { #[cfg(feature = "rustls")] pub type Https = hyper_rustls::HttpsConnector<hyper::client::HttpConnector>; // Creating a `with_native_roots` HTTP client takes 300ms on OS X. Cache this so that we ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
5f4378d3e820cebbb6b7e7413d4592c7d5441559
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/5f4378d3e820cebbb6b7e7413d4592c7d5441559/sdk/aws-smithy-client/src/lib.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:3
use aws_smithy_async::rt::sleep::{default_async_sleep, AsyncSleep}; use aws_smithy_http::body::SdkBody; use aws_smithy_http::operation::Operation; use aws_smithy_http::response::ParseHttpResponse; pub use aws_smithy_http::result::{SdkError, SdkSuccess}; use aws_smithy_http::retry::ClassifyResponse; use aws_smithy_http_...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
5f4378d3e820cebbb6b7e7413d4592c7d5441559
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/5f4378d3e820cebbb6b7e7413d4592c7d5441559/sdk/aws-smithy-client/src/lib.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:4
sleep_impl: Option<Arc<dyn AsyncSleep>>, } // Quick-create for people who just want "the default". impl<C, M> Client<C, M> where M: Default, { /// Create a Smithy client that the given connector, a middleware default, the [standard /// retry policy](crate::retry::Standard), and the [`default_async_sleep`] ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
5f4378d3e820cebbb6b7e7413d4592c7d5441559
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/5f4378d3e820cebbb6b7e7413d4592c7d5441559/sdk/aws-smithy-client/src/lib.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:5
pub fn with_timeout_config(mut self, config: TimeoutConfig) -> Self { self.set_timeout_config(config); self } /// Set the [`AsyncSleep`] function that the client will use to create things like timeout futures. pub fn set_sleep_impl(&mut self, sleep_impl: Option<Arc<dyn AsyncSleep>>) { ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
5f4378d3e820cebbb6b7e7413d4592c7d5441559
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/5f4378d3e820cebbb6b7e7413d4592c7d5441559/sdk/aws-smithy-client/src/lib.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:6
} /// Dispatch this request to the network /// /// The returned result contains the raw HTTP response which can be useful for debugging or /// implementing unsupported features. pub async fn call_raw<O, T, E, Retry>( &self, input: Operation<O, Retry>, ) -> Result<SdkSuccess<T>, ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
5f4378d3e820cebbb6b7e7413d4592c7d5441559
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/5f4378d3e820cebbb6b7e7413d4592c7d5441559/sdk/aws-smithy-client/src/lib.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/lib.rs:7
check_send_sync(svc).ready().await?.call(input).await } /// Statically check the validity of a `Client` without a request to send. /// /// This will make sure that all the bounds hold that would be required by `call` and /// `call_raw` (modulo those that relate to the specific `Operation` type). Co...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/lib.rs
Apache-2.0
5f4378d3e820cebbb6b7e7413d4592c7d5441559
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/5f4378d3e820cebbb6b7e7413d4592c7d5441559/sdk/aws-smithy-client/src/lib.rs
241
263
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Test connectors that never return data use std::marker::PhantomData; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use std::task::{Context, Poll}; use http::Uri; use tower::Bo...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
77a600931b61b1989b46c163297f41975cd65db6
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/aws-smithy-client/src/never.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:2
impl<Req, Resp, Err> Default for NeverService<Req, Resp, Err> { fn default() -> Self { Self::new() } } impl<Req, Resp, Err> NeverService<Req, Resp, Err> { /// Create a new NeverService pub fn new() -> Self { NeverService { _resp: Default::default(), invocations: ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
77a600931b61b1989b46c163297f41975cd65db6
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/aws-smithy-client/src/never.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:3
impl EmptyStream { pub fn new() -> Self { Self } } impl AsyncRead for EmptyStream { fn poll_read( self: Pin<&mut Self>, _cx: &mut Context<'_>, _buf: &mut ReadBuf<'_>, ) -> Poll<std::io::Result<()>> { Poll::Pending ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
77a600931b61b1989b46c163297f41975cd65db6
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/aws-smithy-client/src/never.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:4
/// Create a new NeverReplies service pub fn new() -> Self { Self } } impl tower::Service<Uri> for NeverReplies { type Response = stream::EmptyStream; type Error = BoxError; type Future = std::future::Ready<Result<Self::Response, Self::Error>>; fn poll_ready(&mut self, _cx: &mut Contex...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
77a600931b61b1989b46c163297f41975cd65db6
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/aws-smithy-client/src/never.rs
121
157
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Test connectors that never return data use http::Uri; use aws_smithy_async::future::never::Never; use std::marker::PhantomData; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
4045ba295d91330147543fd10dbbcd36d36bf3a8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/4045ba295d91330147543fd10dbbcd36d36bf3a8/sdk/aws-smithy-client/src/never.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:2
impl<Req, Resp, Err> Default for NeverService<Req, Resp, Err> { fn default() -> Self { Self::new() } } impl<Req, Resp, Err> NeverService<Req, Resp, Err> { /// Create a new NeverService pub fn new() -> Self { NeverService { _resp: Default::default(), invocations: ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
4045ba295d91330147543fd10dbbcd36d36bf3a8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/4045ba295d91330147543fd10dbbcd36d36bf3a8/sdk/aws-smithy-client/src/never.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:3
pub struct EmptyStream; impl EmptyStream { pub fn new() -> Self { Self } } impl AsyncRead for EmptyStream { fn poll_read( self: Pin<&mut Self>, _cx: &mut Context<'_>, _buf: &mut ReadBuf<'_>, ) -> Poll<std::io::Result<()>> { ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
4045ba295d91330147543fd10dbbcd36d36bf3a8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/4045ba295d91330147543fd10dbbcd36d36bf3a8/sdk/aws-smithy-client/src/never.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:4
impl NeverReplies { /// Create a new NeverReplies service pub fn new() -> Self { Self } } impl tower::Service<Uri> for NeverReplies { type Response = stream::EmptyStream; type Error = BoxError; type Future = std::future::Ready<Result<Self::Response, Self::Error>>; fn poll_ready(&mu...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
4045ba295d91330147543fd10dbbcd36d36bf3a8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/4045ba295d91330147543fd10dbbcd36d36bf3a8/sdk/aws-smithy-client/src/never.rs
121
158
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Test connectors that never return data use http::Uri; use aws_smithy_async::future::never::Never; use std::marker::PhantomData; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; u...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1/sdk/aws-smithy-client/src/never.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:2
impl<Req, Resp, Err> Default for NeverService<Req, Resp, Err> { fn default() -> Self { Self::new() } } impl<Req, Resp, Err> NeverService<Req, Resp, Err> { /// Create a new NeverService pub fn new() -> Self { NeverService { _resp: Default::default(), invocations: ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1/sdk/aws-smithy-client/src/never.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Test connectors that never return data use http::Uri; use aws_smithy_async::future::never::Never; use std::marker::PhantomData; use std::task::{Context, Poll}; use crate::erase::boxclone::BoxFut...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/never.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:2
} } impl<Req, Resp, Err> NeverService<Req, Resp, Err> { /// Create a new NeverService pub fn new() -> Self { NeverService { _resp: Default::default(), } } } /// A Connector that can be use with [`Client`](crate::Client) that never returns a response. pub type NeverConnector = ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/never.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:3
self: Pin<&mut Self>, _cx: &mut Context<'_>, _buf: &mut ReadBuf<'_>, ) -> Poll<std::io::Result<()>> { Poll::Pending } } impl AsyncWrite for EmptyStream { fn poll_write( self: Pin<&mut Self>, _cx: &mut Context<'_>, _...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/never.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:4
type Future = std::future::Ready<Result<Self::Response, Self::Error>>; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { Poll::Ready(Ok(())) } fn call(&mut self, _req: Uri) -> Self::Future { std::future::ready(Ok(stream::EmptyStream::new())) } } impl<R...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
8159cb8ff570e4dca718e354c31cecdfadfeb0b8
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/aws-smithy-client/src/never.rs
121
147
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! Test connectors that never return data use http::Uri; use aws_smithy_async::future::never::Never; use std::marker::PhantomData; use std::task::{Context, Poll}; use crate::erase::boxclone::BoxFu...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
3d3e1225e59755683893b72ab74bb68a5a853c8d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/3d3e1225e59755683893b72ab74bb68a5a853c8d/sdk/aws-smithy-client/src/never.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! Test connectors that never return data use http::Uri; use aws_smithy_async::future::never::Never; use std::marker::PhantomData; use std::task::{Context, Poll}; use crate::erase::boxclone::BoxFu...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/never.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:2
} } impl<Req, Resp, Err> NeverService<Req, Resp, Err> { /// Create a new NeverService pub fn new() -> Self { NeverService { _resp: Default::default(), } } } /// A Connector that can be use with [`Client`](crate::Client) that never returns a response. pub type NeverConnector = ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/never.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:3
impl AsyncRead for EmptyStream { fn poll_read( self: Pin<&mut Self>, _cx: &mut Context<'_>, _buf: &mut ReadBuf<'_>, ) -> Poll<std::io::Result<()>> { Poll::Pending } } impl AsyncWrite for EmptyStream { fn poll_write( sel...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/never.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/never.rs:4
type Response = stream::EmptyStream; type Error = BoxError; type Future = std::future::Ready<Result<Self::Response, Self::Error>>; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { Poll::Ready(Ok(())) } fn call(&mut self, _req: Uri) -> Self::Future { ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/never.rs
Apache-2.0
fe1cfc31a925306b740e22a005fbf0ab6ec4fca7
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/fe1cfc31a925306b740e22a005fbf0ab6ec4fca7/sdk/aws-smithy-client/src/never.rs
121
149
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/poison.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Connection Poisoning //! //! The client supports behavior where on transient errors (e.g. timeouts, 503, etc.) it will ensure //! that the offending connection is not reused. This happens to ensure t...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/poison.rs
Apache-2.0
8657f207e05add10eb5b9d0faaa17522e42a3f84
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8657f207e05add10eb5b9d0faaa17522e42a3f84/sdk/aws-smithy-client/src/poison.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/poison.rs:2
mode: ReconnectMode, } impl<S> PoisonLayer<S> { pub(crate) fn new(mode: ReconnectMode) -> Self { Self { inner: Default::default(), mode, } } } impl<S> Clone for PoisonLayer<S> { fn clone(&self) -> Self { Self { inner: Default::default(), ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/poison.rs
Apache-2.0
8657f207e05add10eb5b9d0faaa17522e42a3f84
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8657f207e05add10eb5b9d0faaa17522e42a3f84/sdk/aws-smithy-client/src/poison.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/poison.rs:3
R: ClassifyRetry<SdkSuccess<O>, SdkError<E>>, S: tower::Service<Operation<H, R>, Response = SdkSuccess<O>, Error = SdkError<E>>, { type Response = S::Response; type Error = S::Error; type Future = PoisonServiceFuture<S::Future, R>; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), S...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/poison.rs
Apache-2.0
8657f207e05add10eb5b9d0faaa17522e42a3f84
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8657f207e05add10eb5b9d0faaa17522e42a3f84/sdk/aws-smithy-client/src/poison.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/poison.rs:4
type Output = F::Output; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { let this = self.project(); match this.inner.poll(cx) { Poll::Ready(resp) => { let retry_kind = this.classifier.classify_retry(resp.as_ref()); if this.mode...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/poison.rs
Apache-2.0
8657f207e05add10eb5b9d0faaa17522e42a3f84
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/8657f207e05add10eb5b9d0faaa17522e42a3f84/sdk/aws-smithy-client/src/poison.rs
121
143
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Retry support //! //! Components: //! - [`Standard`]: Top level manager, intended to be associated with a [`Client`](crate::Client). //! Its sole purpose in life is to create a [`RetryHandler`] for...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:2
/// Create a new policy mechanism instance. fn new_request_policy(&self, sleep_impl: Option<SharedAsyncSleep>) -> Self::Policy; } /// Retry Policy Configuration /// /// Without specific use cases, users should generally rely on the default values set /// by [`Config::default`](Config::default). /// /// Currently t...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
41
100
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:3
/// `max_attempts` must be set to a value of at least `1` (indicating that retries are disabled). pub fn with_max_attempts(mut self, max_attempts: u32) -> Self { self.max_attempts = max_attempts; self } /// Override the default backoff multiplier of 1 second. /// /// ## Example ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
81
140
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:4
base: fastrand::f64, initial_backoff: Duration::from_secs(1), } } } impl From<aws_smithy_types::retry::RetryConfig> for Config { fn from(conf: aws_smithy_types::retry::RetryConfig) -> Self { Self::default() .with_max_attempts(conf.max_attempts()) .with_initia...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:5
self } } impl NewRequestPolicy for Standard { type Policy = RetryHandler; fn new_request_policy(&self, sleep_impl: Option<SharedAsyncSleep>) -> Self::Policy { RetryHandler { local: RequestLocalRetryState::new(), shared: self.shared_state.clone(), config: self.co...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:6
fn new() -> Self { Self::default() } } /* TODO(retries) /// RetryPartition represents a scope for cross request retry state /// /// For example, a retry partition could be the id of a service. This would give each service a separate retry budget. struct RetryPartition(Cow<'static, str>); */ /// Shared sta...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:7
} else { config.retry_cost }; if retry_cost > *quota { None } else { *quota -= retry_cost; Some(retry_cost) } } } type BoxFuture<T> = Pin<Box<dyn Future<Output = T> + Send>>; /// RetryHandler /// /// Implement retries for an individua...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
241
300
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:8
/// - the first retry will occur after 0 to 30 milliseconds /// - the second retry will occur after 0 to 60 milliseconds /// - the third retry will occur after 0 to 120 milliseconds fn calculate_exponential_backoff(base: f64, initial_backoff: f64, retry_attempts: u32) -> f64 { base * initial_backoff * 2_u32.pow(ret...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
281
340
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:9
let next = RetryHandler { local: RequestLocalRetryState { attempts: self.local.attempts + 1, last_quota_usage: Some(quota_used), }, shared: self.shared.clone(), config: self.config.clone(), sleep_impl: self.sleep_impl.clone(), ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
321
380
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:10
}; tracing::debug!( "attempt {} failed with {:?}; retrying after {:?}", self.local.attempts, retry_kind, dur ); let sleep_future = sleep.sleep(dur); let fut = async move { sleep_future.await; next } ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
361
420
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:11
} fn check_send<T: Send>(t: T) -> T { t } #[cfg(test)] mod test { use super::{calculate_exponential_backoff, Config, NewRequestPolicy, RetryHandler, Standard}; use aws_smithy_types::retry::{ErrorKind, RetryKind}; use std::time::Duration; fn test_config() -> Config { Config::default().wi...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
401
460
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:12
let no_retry = policy.should_retry(&RetryKind::Unnecessary); assert!(no_retry.is_none()); assert_eq!(policy.retry_quota(), 495); } #[test] fn no_more_attempts() { let policy = Standard::new(test_config()).new_request_policy(None); let (policy, dur) = policy .shou...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
441
500
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:13
} #[test] fn quota_replenishes_on_success() { let mut conf = test_config(); conf.initial_retry_tokens = 100; let policy = Standard::new(conf).new_request_policy(None); let (policy, dur) = policy .should_retry(&RetryKind::Error(ErrorKind::TransientError)) ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
481
540
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:14
assert_eq!(policy.retry_quota(), 495); let (policy, dur) = policy .should_retry(&RetryKind::Error(ErrorKind::ServerError)) .expect("should retry"); assert_eq!(dur, Duration::from_secs(2)); assert_eq!(policy.retry_quota(), 490); let (policy, dur) = policy ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
521
580
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:15
.expect("should retry"); assert_eq!(dur, Duration::from_secs(2)); assert_eq!(policy.retry_quota(), 490); let (policy, dur) = policy .should_retry(&RetryKind::Error(ErrorKind::ServerError)) .expect("should retry"); assert_eq!(dur, Duration::from_secs(3)); ...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
561
614
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:16
} } #[test] fn calculate_exponential_backoff_where_initial_backoff_is_less_than_one() { let initial_backoff = 0.03; for (attempt, expected_backoff) in [initial_backoff, 0.06, 0.12].into_iter().enumerate() { let actual_backoff = calculate_exponential_backoff(1.0,...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2fcec800932fc3e127633fde6c64b3a5852d36e3
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/aws-smithy-client/src/retry.rs
601
614
awslabs/aws-sdk-rust:sdk/aws-smithy-client/src/retry.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Retry support //! //! Components: //! - [`Standard`]: Top level manager, intended to be associated with a [`Client`](crate::Client). //! Its sole purpose in life is to create a [`RetryHandler`] for...
rust
rust
rust-source
awslabs/aws-sdk-rust
sdk/aws-smithy-client/src/retry.rs
Apache-2.0
2b4a7b881b8735aad288284e1c140ed40f474d06
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/2b4a7b881b8735aad288284e1c140ed40f474d06/sdk/aws-smithy-client/src/retry.rs
1
60