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-runtime-api/src/client/runtime_components.rs:23
} validate!(&self.http_client); validate!(&self.endpoint_resolver); validate!(&self.auth_schemes); validate!(&self.identity_cache); if let Some(resolvers) = &self.identity_resolvers { validate!(resolvers.values()) } validate!(&self.interceptors); ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
881
940
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:24
/// Returns the time source if one is available. pub fn time_source(&self) -> Option<SharedTimeSource> { self.time_source.clone() } } #[derive(Clone, Debug)] #[cfg_attr(test, derive(Eq, PartialEq))] pub(crate) struct Tracked<T> { _origin: &'static str, value: T, } impl<T> Tracked<T> { fn n...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
921
980
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:25
) -> Result<std::borrow::Cow<'_, [AuthSchemeId]>, BoxError> { unreachable!("fake auth scheme option resolver must be overridden for this test") } } #[derive(Debug)] struct FakeClient; impl HttpClient for FakeClient { fn http_connector( ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
961
1,020
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:26
unreachable!("fake http auth scheme must be overridden for this test") } } #[derive(Debug)] struct FakeIdentityResolver; impl ResolveIdentity for FakeIdentityResolver { fn resolve_identity<'a>( &'a self, _: &'a RuntimeComponents, ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,001
1,060
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:27
fn now(&self) -> std::time::SystemTime { unreachable!("fake time source must be overridden for this test") } } #[derive(Debug)] struct FakeSleep; impl AsyncSleep for FakeSleep { fn sleep(&self, _: std::time::Duration) -> aws_smithy_async::rt::slee...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,041
1,100
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:28
/// An error that occurs when building runtime components. #[derive(Debug)] pub struct BuildError(&'static str); impl std::error::Error for BuildError {} impl fmt::Display for BuildError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.0) } } /// A trait for retrievin...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,081
1,140
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:29
TestComponent(value.into()) } } #[test] #[allow(unreachable_pub)] #[allow(dead_code)] fn the_builders_should_merge() { declare_runtime_components! { fields for TestRc and TestRcBuilder { #[required] some_required_component: Option<TestComp...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,121
1,180
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:30
some_required_vec: vec![Tracked::new("builder2", "second".into())], some_optional_vec: vec![Tracked::new("builder2", "second optional".into())], }; let builder3 = TestRcBuilder { builder_name: "builder3", some_required_component: Some(Tracked::new("builder3", "correct...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,161
1,220
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:31
], rc.some_optional_vec ); } #[test] #[allow(unreachable_pub)] #[allow(dead_code)] #[should_panic(expected = "the `_some_component` runtime component is required")] fn require_field_singular() { declare_runtime_components! { fields for TestRc and TestRcBu...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,201
1,260
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:32
fn sort(&mut self) {} } let rc = TestRcBuilder::new("test").build().unwrap(); // Ensure the correct types were used let _: Vec<Tracked<TestComponent>> = rc._some_vec; } #[test] #[allow(unreachable_pub)] #[allow(dead_code)] fn optional_fields_dont_panic() { ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,241
1,300
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:33
use crate::client::runtime_components::{GetIdentityResolver, RuntimeComponents}; use aws_smithy_types::config_bag::ConfigBag; use tokio::runtime::Runtime; #[derive(Debug)] struct AnotherFakeIdentityResolver; impl ResolveIdentity for AnotherFakeIdentityResolver { fn r...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
ae6d739d57f5c7127a9e57d5010b595c00c3208d
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,281
1,317
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:22
.extend(config_validators.map(|s| Tracked::new(self.builder_name, s))); self } /// Adds a config validator. pub fn push_config_validator( &mut self, config_validator: impl ValidateConfig + 'static, ) -> &mut Self { self.config_validators.push(Tracked::new( se...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
841
900
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:23
} validate!(&self.http_client); validate!(&self.endpoint_resolver); validate!(&self.auth_schemes); validate!(&self.identity_cache); if let Some(resolvers) = &self.identity_resolvers { validate!(resolvers.values()) } validate!(&self.interceptors); ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
881
940
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:24
impl RuntimeComponentsBuilder { /// Creates a runtime components builder with all the required components filled in with fake (panicking) implementations. #[cfg(feature = "test-util")] pub fn for_tests() -> Self { use crate::client::endpoint::{EndpointFuture, EndpointResolverParams}; use cra...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
921
980
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:25
impl AuthScheme for FakeAuthScheme { fn scheme_id(&self) -> AuthSchemeId { AuthSchemeId::new("fake") } fn identity_resolver( &self, _: &dyn GetIdentityResolver, ) -> Option<SharedIdentityResolver> { None ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
961
1,020
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:27
Self::new("aws_smithy_runtime_api::client::runtime_components::RuntimeComponentBuilder::for_tests") .with_auth_scheme(FakeAuthScheme) .with_auth_scheme_option_resolver(Some(FakeAuthSchemeOptionResolver)) .with_endpoint_resolver(Some(FakeEndpointResolver)) .with_http_clien...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,041
1,100
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:28
} } #[cfg(all(test, feature = "test-util"))] mod tests { use super::{BuildError, RuntimeComponentsBuilder, Tracked}; use crate::client::runtime_components::ValidateConfig; #[derive(Clone, Debug, Eq, PartialEq)] struct TestComponent(String); impl ValidateConfig for TestComponent {} impl From<&'...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,081
1,140
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:29
builder_name: "builder1", some_required_component: Some(Tracked::new("builder1", "override_me".into())), some_optional_component: Some(Tracked::new("builder1", "override_me optional".into())), some_required_vec: vec![Tracked::new("builder1", "first".into())], some_optiona...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,121
1,180
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:30
assert_eq!( vec![ Tracked::new("builder1", TestComponent::from("first")), Tracked::new("builder2", TestComponent::from("second")), Tracked::new("builder3", TestComponent::from("third")) ], rc.some_required_vec ); assert_...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,161
1,220
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:31
#[test] #[allow(unreachable_pub)] #[allow(dead_code)] #[should_panic(expected = "at least one `_some_vec` runtime component is required")] fn require_field_plural() { declare_runtime_components! { fields for TestRc and TestRcBuilder { #[atLeastOneRequired] ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,201
1,260
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:32
let _: Option<Tracked<TestComponent>> = rc._some_optional_component; let _: Vec<Tracked<TestComponent>> = rc._some_optional_vec; } #[test] fn building_test_builder_should_not_panic() { let _ = RuntimeComponentsBuilder::for_tests().build(); // should not panic } #[test] fn set_i...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e3eaade51d0c889a9d3ac24ee096a49452fecc23
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e3eaade51d0c889a9d3ac24ee096a49452fecc23/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,241
1,290
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:10
#[required] identity_cache: Option<SharedIdentityCache>, #[atLeastOneRequired] identity_resolvers: OptionalAuthSchemeMap<SharedIdentityResolver>, interceptors: Vec<SharedInterceptor>, retry_classifiers: Vec<SharedRetryClassifier>, #[required] retry_strategy: O...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
361
420
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:11
self.endpoint_resolver.value.clone() } /// Returns the requested auth scheme if it is set. pub fn auth_scheme(&self, scheme_id: AuthSchemeId) -> Option<SharedAuthScheme> { self.auth_schemes .iter() .find(|s| s.value.scheme_id() == scheme_id) .map(|s| s.value.clon...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
401
460
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:12
} /// Returns the time source. pub fn time_source(&self) -> Option<SharedTimeSource> { self.time_source.as_ref().map(|s| s.value.clone()) } /// Returns the config validators. pub fn config_validators(&self) -> impl Iterator<Item = SharedConfigValidator> + '_ { self.config_validator...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
441
500
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:13
} validate!(Option: self.http_client); validate!(Required: self.endpoint_resolver); validate!(Vec: &self.auth_schemes); validate!(Required: self.identity_cache); validate!(Map: self.identity_resolvers); validate!(Vec: &self.interceptors); validate!(Required: self...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
481
540
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:14
auth_scheme_option_resolver: Option<impl ResolveAuthSchemeOptions + 'static>, ) -> Self { self.set_auth_scheme_option_resolver(auth_scheme_option_resolver); self } /// Returns the HTTP client. pub fn http_client(&self) -> Option<SharedHttpClient> { self.http_client.as_ref().map(...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
521
580
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:15
mut self, endpoint_resolver: Option<impl ResolveEndpoint + 'static>, ) -> Self { self.set_endpoint_resolver(endpoint_resolver); self } /// Returns the auth schemes. pub fn auth_schemes(&self) -> impl Iterator<Item = SharedAuthScheme> + '_ { self.auth_schemes.iter().map(|...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
561
620
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:16
/// Sets the identity cache. pub fn with_identity_cache( mut self, identity_cache: Option<impl ResolveCachedIdentity + 'static>, ) -> Self { self.set_identity_cache(identity_cache); self } /// This method is broken since it does not replace an existing identity resolver ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
601
660
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:21
/// Returns the config validators. pub fn config_validators(&self) -> impl Iterator<Item = SharedConfigValidator> + '_ { self.config_validators.iter().map(|s| s.value.clone()) } /// Adds all the given config validators. pub fn extend_config_validators( &mut self, config_validato...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
801
860
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:22
pub fn validate_base_client_config(&self, cfg: &ConfigBag) -> Result<(), BoxError> { macro_rules! validate { ($field:expr) => { for entry in $field { ValidateConfig::validate_base_client_config(&entry.value, self, cfg)?; } }; } ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
841
900
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:23
Self { _origin: origin, value, } } #[cfg(debug_assertions)] pub(crate) fn value(&self) -> &T { &self.value } } impl RuntimeComponentsBuilder { /// Creates a runtime components builder with all the required components filled in with fake (panicking) implement...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
881
940
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:24
} #[derive(Debug)] struct FakeEndpointResolver; impl ResolveEndpoint for FakeEndpointResolver { fn resolve_endpoint<'a>(&'a self, _: &'a EndpointResolverParams) -> EndpointFuture<'a> { unreachable!("fake endpoint resolver must be overridden for this test") ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
921
980
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:25
#[derive(Debug)] struct FakeRetryStrategy; impl RetryStrategy for FakeRetryStrategy { fn should_attempt_initial_request( &self, _: &RuntimeComponents, _: &ConfigBag, ) -> Result<crate::client::retries::ShouldAttempt, BoxError> { ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
961
1,020
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:26
impl ResolveCachedIdentity for FakeIdentityCache { fn resolve_cached_identity<'a>( &'a self, resolver: SharedIdentityResolver, components: &'a RuntimeComponents, config_bag: &'a ConfigBag, ) -> IdentityFuture<'a> { I...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,001
1,060
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:27
/// This trait exists so that [`AuthScheme::identity_resolver`] /// can have access to configured identity resolvers without having access to all the runtime components. pub trait GetIdentityResolver: Send + Sync { /// Returns the requested identity resolver if it is set. fn identity_resolver(&self, scheme_id: ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,041
1,100
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:28
#[atLeastOneRequired] some_required_vec: Vec<TestComponent>, some_optional_vec: Vec<TestComponent>, } } impl TestRc { fn sort(&mut self) {} } let builder1 = TestRcBuilder { builder_name: "builder1", some_r...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,081
1,140
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:29
.expect("success"); assert_eq!( Tracked::new("builder3", TestComponent::from("correct")), rc.some_required_component ); assert_eq!( Some(Tracked::new( "builder3", TestComponent::from("correct optional") )), ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,121
1,180
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:30
} impl TestRc { fn sort(&mut self) {} } let rc = TestRcBuilder::new("test").build().unwrap(); // Ensure the correct types were used let _: Tracked<TestComponent> = rc._some_component; } #[test] #[allow(unreachable_pub)] #[allow(dead_code)] #[sh...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,161
1,220
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:31
_some_optional_component: Option<TestComponent>, _some_optional_vec: Vec<TestComponent>, } } impl TestRc { fn sort(&mut self) {} } let rc = TestRcBuilder::new("test").build().unwrap(); // Ensure the correct types were used let _:...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,201
1,260
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:32
// Set a different `IdentityResolver` for the `fake` auth scheme already configured in // a test runtime components builder let rc = RuntimeComponentsBuilder::for_tests() .with_identity_resolver(AuthSchemeId::new("fake"), AnotherFakeIdentityResolver) .build() .expect(...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
e54da462967592886f7069adcf77e91a0fd29d94
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/e54da462967592886f7069adcf77e91a0fd29d94/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,241
1,262
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:11
self.endpoint_resolver.value.clone() } /// Returns the requested auth scheme if it is set. pub fn auth_scheme(&self, scheme_id: AuthSchemeId) -> Option<SharedAuthScheme> { self.auth_schemes .iter() .find(|s| s.value.scheme_id() == scheme_id) .map(|s| s.value.clon...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
401
460
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:12
/// Returns the time source. pub fn time_source(&self) -> Option<SharedTimeSource> { self.time_source.as_ref().map(|s| s.value.clone()) } /// Returns the config validators. pub fn config_validators(&self) -> impl Iterator<Item = SharedConfigValidator> + '_ { self.config_validators.iter(...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
441
500
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:13
validate!(Option: self.http_client); validate!(Required: self.endpoint_resolver); validate!(Vec: &self.auth_schemes); validate!(Required: self.identity_cache); validate!(Map: self.identity_resolvers); validate!(Vec: &self.interceptors); validate!(Required: self.retry_stra...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
481
540
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:14
) -> Self { self.set_auth_scheme_option_resolver(auth_scheme_option_resolver); self } /// Returns the HTTP client. pub fn http_client(&self) -> Option<SharedHttpClient> { self.http_client.as_ref().map(|s| s.value.clone()) } /// Sets the HTTP client. pub fn set_http_clie...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
521
580
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:15
endpoint_resolver: Option<impl ResolveEndpoint + 'static>, ) -> Self { self.set_endpoint_resolver(endpoint_resolver); self } /// Returns the auth schemes. pub fn auth_schemes(&self) -> impl Iterator<Item = SharedAuthScheme> + '_ { self.auth_schemes.iter().map(|s| s.value.clone()...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
561
620
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:16
pub fn with_identity_cache( mut self, identity_cache: Option<impl ResolveCachedIdentity + 'static>, ) -> Self { self.set_identity_cache(identity_cache); self } /// This method is broken since it does not replace an existing identity resolver of the given auth scheme ID. ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
601
660
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:17
pub fn with_identity_resolver( mut self, scheme_id: AuthSchemeId, identity_resolver: impl ResolveIdentity + 'static, ) -> Self { self.set_identity_resolver(scheme_id, identity_resolver); self } /// Returns the interceptors. pub fn interceptors(&self) -> impl Iter...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
641
700
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:18
interceptors: impl Iterator<Item = SharedInterceptor>, ) -> &mut Self { self.interceptors.clear(); self.interceptors .extend(interceptors.map(|s| Tracked::new(self.builder_name, s))); self } /// Directly sets the interceptors and clears out any that were previously pushe...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
681
740
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:19
)); self } /// Adds a retry_classifier. pub fn with_retry_classifier(mut self, retry_classifier: impl ClassifyRetry + 'static) -> Self { self.push_retry_classifier(retry_classifier); self } /// Directly sets the retry_classifiers and clears out any that were previously push...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
721
780
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:20
) -> Self { self.retry_strategy = retry_strategy.map(|s| Tracked::new(self.builder_name, s.into_shared())); self } /// Returns the async sleep implementation. pub fn sleep_impl(&self) -> Option<SharedAsyncSleep> { self.sleep_impl.as_ref().map(|s| s.value.clone()) } ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
761
820
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:21
/// Returns the config validators. pub fn config_validators(&self) -> impl Iterator<Item = SharedConfigValidator> + '_ { self.config_validators.iter().map(|s| s.value.clone()) } /// Adds all the given config validators. pub fn extend_config_validators( &mut self, config_validato...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
801
860
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:22
macro_rules! validate { ($field:expr) => { for entry in $field { ValidateConfig::validate_base_client_config(&entry.value, self, cfg)?; } }; } tracing::trace!(runtime_components=?self, cfg=?cfg, "validating base client config")...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
841
900
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:23
_origin: origin, value, } } pub(crate) fn value(&self) -> &T { &self.value } } impl RuntimeComponentsBuilder { /// Creates a runtime components builder with all the required components filled in with fake (panicking) implementations. #[cfg(feature = "test-util")] pu...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
881
940
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:24
#[derive(Debug)] struct FakeEndpointResolver; impl ResolveEndpoint for FakeEndpointResolver { fn resolve_endpoint<'a>(&'a self, _: &'a EndpointResolverParams) -> EndpointFuture<'a> { unreachable!("fake endpoint resolver must be overridden for this test") } ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
921
980
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:25
struct FakeRetryStrategy; impl RetryStrategy for FakeRetryStrategy { fn should_attempt_initial_request( &self, _: &RuntimeComponents, _: &ConfigBag, ) -> Result<crate::client::retries::ShouldAttempt, BoxError> { unreachable!...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
961
1,020
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:26
&'a self, resolver: SharedIdentityResolver, components: &'a RuntimeComponents, config_bag: &'a ConfigBag, ) -> IdentityFuture<'a> { IdentityFuture::new(async move { resolver.resolve_identity(components, config_bag).await ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,001
1,060
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:27
pub trait GetIdentityResolver: Send + Sync { /// Returns the requested identity resolver if it is set. fn identity_resolver(&self, scheme_id: AuthSchemeId) -> Option<SharedIdentityResolver>; } impl GetIdentityResolver for RuntimeComponents { fn identity_resolver(&self, scheme_id: AuthSchemeId) -> Option<Sh...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,041
1,100
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:28
some_optional_vec: Vec<TestComponent>, } } impl TestRc { fn sort(&mut self) {} } let builder1 = TestRcBuilder { builder_name: "builder1", some_required_component: Some(Tracked::new("builder1", "override_me".into())), some_opti...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,081
1,140
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:29
Tracked::new("builder3", TestComponent::from("correct")), rc.some_required_component ); assert_eq!( Some(Tracked::new( "builder3", TestComponent::from("correct optional") )), rc.some_optional_component ); ass...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,121
1,180
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:30
impl TestRc { fn sort(&mut self) {} } let rc = TestRcBuilder::new("test").build().unwrap(); // Ensure the correct types were used let _: Tracked<TestComponent> = rc._some_component; } #[test] #[allow(unreachable_pub)] #[allow(dead_code)] #[should_panic(...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,161
1,220
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:31
} } impl TestRc { fn sort(&mut self) {} } let rc = TestRcBuilder::new("test").build().unwrap(); // Ensure the correct types were used let _: Option<Tracked<TestComponent>> = rc._some_optional_component; let _: Vec<Tracked<TestComponent>> = rc._some_...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,201
1,260
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:32
// a test runtime components builder let rc = RuntimeComponentsBuilder::for_tests() .with_identity_resolver(AuthSchemeId::new("fake"), AnotherFakeIdentityResolver) .build() .expect("should build RuntimeComponents"); let resolver = rc .identity_resolver(Au...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
7e04e9576127a5499d21016d10b8a285e7121746
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/7e04e9576127a5499d21016d10b8a285e7121746/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,241
1,260
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:4
/// if components.sleep_impl().is_none() { /// return Err("I need a sleep_impl!".into()); /// } /// Ok(()) /// } /// /// let validator = SharedConfigValidator::base_client_config_fn(my_validation); /// ``` pub fn base_client_config_fn( validator: fn(&RuntimeCo...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:8
/// Following that, all the fields are specified. Fields MUST be wrapped in `Option` or `Vec`. /// To make a field required in the non-builder struct, add `#[required]` for `Option` fields, or /// `#[atLeastOneRequired]` for `Vec` fields. /// /// ```no_compile /// declare_runtime_components! { /// fields for TestRc...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
281
340
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:9
/// the origin of a component can be easily found when debugging. pub const fn new(name: &'static str) -> Self { Self { builder_name: name, $($field_name: empty_builder_value!($outer_type),)+ } } /// Merge in co...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
321
380
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:10
#[atLeastOneRequired] identity_resolvers: OptionalAuthSchemeMap<SharedIdentityResolver>, interceptors: Vec<SharedInterceptor>, retry_classifiers: Vec<SharedRetryClassifier>, #[required] retry_strategy: Option<SharedRetryStrategy>, time_source: Option<SharedTimeSource>...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
361
420
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:11
/// Returns the requested auth scheme if it is set. pub fn auth_scheme(&self, scheme_id: AuthSchemeId) -> Option<SharedAuthScheme> { self.auth_schemes .iter() .find(|s| s.value.scheme_id() == scheme_id) .map(|s| s.value.clone()) } /// Returns the identity cache. ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
401
460
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:12
self.config_validators.iter().map(|s| s.value.clone()) } /// Validate the final client configuration. /// /// This is intended to be called internally by the client. pub fn validate_final_config(&self, cfg: &ConfigBag) -> Result<(), BoxError> { macro_rules! validate { (Required:...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
441
500
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:13
} } impl RuntimeComponentsBuilder { /// Returns the auth scheme option resolver. pub fn auth_scheme_option_resolver(&self) -> Option<SharedAuthSchemeOptionResolver> { self.auth_scheme_option_resolver .as_ref() .map(|s| s.value.clone()) } /// Sets the auth scheme option ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
481
540
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:14
/// Sets the HTTP client. pub fn with_http_client(mut self, connector: Option<impl HttpClient + 'static>) -> Self { self.set_http_client(connector); self } /// Returns the endpoint resolver. pub fn endpoint_resolver(&self) -> Option<SharedEndpointResolver> { self.endpoint_resolv...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
521
580
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:15
self } /// Adds an auth scheme. pub fn with_auth_scheme(mut self, auth_scheme: impl AuthScheme + 'static) -> Self { self.push_auth_scheme(auth_scheme); self } /// Returns the identity cache. pub fn identity_cache(&self) -> Option<SharedIdentityCache> { self.identity_cac...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
561
620
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:16
scheme_id: AuthSchemeId, identity_resolver: impl ResolveIdentity + 'static, ) -> &mut Self { self.set_identity_resolver(scheme_id, identity_resolver) } /// Sets the identity resolver for a given `scheme_id`. /// /// If there is already an identity resolver for that `scheme_id`, this...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
601
660
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:17
pub fn extend_interceptors( &mut self, interceptors: impl Iterator<Item = SharedInterceptor>, ) -> &mut Self { self.interceptors .extend(interceptors.map(|s| Tracked::new(self.builder_name, s))); self } /// Adds an interceptor. pub fn push_interceptor(&mut se...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
641
700
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:18
} /// Returns the retry classifiers. pub fn retry_classifiers(&self) -> impl Iterator<Item = SharedRetryClassifier> + '_ { self.retry_classifiers.iter().map(|s| s.value.clone()) } /// Adds all the given retry classifiers. pub fn extend_retry_classifiers( &mut self, retry_cl...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
681
740
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:19
self.retry_classifiers.clear(); self.retry_classifiers .extend(retry_classifiers.map(|s| Tracked::new(self.builder_name, s))); self } /// Returns the retry strategy. pub fn retry_strategy(&self) -> Option<SharedRetryStrategy> { self.retry_strategy.as_ref().map(|s| s.valu...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
721
780
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:20
} /// Sets the async sleep implementation. pub fn with_sleep_impl(mut self, sleep_impl: Option<impl AsyncSleep + 'static>) -> Self { self.set_sleep_impl(sleep_impl.map(IntoShared::into_shared)); self } /// Returns the time source. pub fn time_source(&self) -> Option<SharedTimeSourc...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
761
820
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:21
/// Adds a config validator. pub fn push_config_validator( &mut self, config_validator: impl ValidateConfig + 'static, ) -> &mut Self { self.config_validators.push(Tracked::new( self.builder_name, config_validator.into_shared(), )); self } ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
801
860
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:22
validate!(&self.identity_cache); if let Some(resolvers) = &self.identity_resolvers { validate!(resolvers.values()) } validate!(&self.interceptors); validate!(&self.retry_strategy); Ok(()) } /// Wraps `v` in tracking associated with this builder fn tracked...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
841
900
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:23
impl ResolveAuthSchemeOptions for FakeAuthSchemeOptionResolver { fn resolve_auth_scheme_options( &self, _: &crate::client::auth::AuthSchemeOptionResolverParams, ) -> Result<std::borrow::Cow<'_, [AuthSchemeId]>, crate::box_error::BoxError> { ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
881
940
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:24
) -> Option<SharedIdentityResolver> { None } fn signer(&self) -> &dyn crate::client::auth::Sign { unreachable!("fake http auth scheme must be overridden for this test") } } #[derive(Debug)] struct FakeIdentityResolver; ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
921
980
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:27
use crate::client::runtime_components::ValidateConfig; #[derive(Clone, Debug, Eq, PartialEq)] struct TestComponent(String); impl ValidateConfig for TestComponent {} impl From<&'static str> for TestComponent { fn from(value: &'static str) -> Self { TestComponent(value.into()) ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,041
1,100
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:28
"builder2", "override_me_too optional".into(), )), some_required_vec: vec![Tracked::new("builder2", "second".into())], some_optional_vec: vec![Tracked::new("builder2", "second optional".into())], }; let builder3 = TestRcBuilder { builder_na...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,081
1,140
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:29
Tracked::new("builder1", TestComponent::from("first optional")), Tracked::new("builder2", TestComponent::from("second optional")), Tracked::new("builder3", TestComponent::from("third optional")) ], rc.some_optional_vec ); } #[test] #[allow(unr...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,121
1,180
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:30
// Ensure the correct types were used let _: Vec<Tracked<TestComponent>> = rc._some_vec; } #[test] #[allow(unreachable_pub)] #[allow(dead_code)] fn optional_fields_dont_panic() { declare_runtime_components! { fields for TestRc and TestRcBuilder { _some_op...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,161
1,220
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:31
_: &'a RuntimeComponents, _: &'a ConfigBag, ) -> IdentityFuture<'a> { IdentityFuture::ready(Ok(Identity::new("doesntmatter", None))) } } // Set a different `IdentityResolver` for the `fake` auth scheme already configured in // a test runti...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
6198a9fe283213374065dab4f7f5e9bbe36d9139
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/6198a9fe283213374065dab4f7f5e9bbe36d9139/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1,201
1,228
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:1
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ //! Runtime components used to make a request and handle a response. //! //! Runtime components are trait implementations that are _always_ used by the orchestrator. //! There are other trait implementat...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
1
60
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:4
/// if components.sleep_impl().is_none() { /// return Err("I need a sleep_impl!".into()); /// } /// Ok(()) /// } /// /// let validator = SharedConfigValidator::base_client_config_fn(my_validation); /// ``` pub fn base_client_config_fn( validator: fn(&RuntimeCo...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
121
180
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:5
_ => Ok(()), } } } impl_shared_conversions!(convert SharedConfigValidator from ValidateConfig using SharedConfigValidator::new); /// Internal to `declare_runtime_components!`. /// /// Merges a field from one builder into another. macro_rules! merge { (Option $other:ident . $name:ident => $self:ident) ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
161
220
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:6
if $self.$name.is_empty() { return Err(BuildError(concat!( "at least one `", stringify!($name), "` runtime component is required" ))); } $self.$name }}; } /// Internal to `declare_runtime_components!`. /// /// Converts the field...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
201
260
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:7
} /// Macro to define the structs for both `RuntimeComponents` and `RuntimeComponentsBuilder`. /// /// This is a macro in order to keep the fields consistent between the two, and to automatically /// update the `merge_from` and `build` methods when new components are added. /// /// It also facilitates unit testing sin...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
241
300
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:8
$($field_name: runtime_component_field_type!($outer_type $inner_type $($option)?),)+ } /// Builder for [`RuntimeComponents`]. #[derive(Clone, Debug)] pub struct $builder_name { builder_name: &'static str, $($field_name: $outer_type<Tracked<$inner_type>>,)+ ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
281
340
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:9
#[required] auth_scheme_option_resolver: Option<SharedAuthSchemeOptionResolver>, // A connector is not required since a client could technically only be used for presigning http_client: Option<SharedHttpClient>, #[required] endpoint_resolver: Option<SharedEndpointResolver>, ...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
321
380
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:10
pub fn auth_scheme_option_resolver(&self) -> SharedAuthSchemeOptionResolver { self.auth_scheme_option_resolver.value.clone() } /// Returns the HTTP client. pub fn http_client(&self) -> Option<SharedHttpClient> { self.http_client.as_ref().map(|s| s.value.clone()) } /// Returns the e...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
361
420
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:11
} /// Returns the async sleep implementation. pub fn sleep_impl(&self) -> Option<SharedAsyncSleep> { self.sleep_impl.as_ref().map(|s| s.value.clone()) } /// Returns the time source. pub fn time_source(&self) -> Option<SharedTimeSource> { self.time_source.as_ref().map(|s| s.value.cl...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
401
460
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:12
} validate!(Option: self.http_client); validate!(Required: self.endpoint_resolver); validate!(Vec: self.auth_schemes); validate!(Required: self.identity_cache); validate!(Vec: self.identity_resolvers); validate!(Vec: self.interceptors); validate!(Required: self.re...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
441
500
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:13
pub fn http_client(&self) -> Option<SharedHttpClient> { self.http_client.as_ref().map(|s| s.value.clone()) } /// Sets the HTTP client. pub fn set_http_client(&mut self, connector: Option<impl HttpClient + 'static>) -> &mut Self { self.http_client = self.tracked(connector.map(IntoShared::int...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
481
540
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:14
/// Returns the auth schemes. pub fn auth_schemes(&self) -> impl Iterator<Item = SharedAuthScheme> + '_ { self.auth_schemes.iter().map(|s| s.value.clone()) } /// Adds an auth scheme. pub fn push_auth_scheme(&mut self, auth_scheme: impl AuthScheme + 'static) -> &mut Self { self.auth_sche...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
521
580
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:15
} /// This method is broken since it does not replace an existing identity resolver of the given auth scheme ID. /// Use `set_identity_resolver` instead. #[deprecated( note = "This method is broken since it does not replace an existing identity resolver of the given auth scheme ID. Use `set_identit...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
561
620
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:16
self.identity_resolvers.push(tracked); } self } /// Adds an identity resolver. pub fn with_identity_resolver( mut self, scheme_id: AuthSchemeId, identity_resolver: impl ResolveIdentity + 'static, ) -> Self { self.set_identity_resolver(scheme_id, identity...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
601
660
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/runtime_components.rs:17
self.push_interceptor(interceptor); self } /// Directly sets the interceptors and clears out any that were previously pushed. pub fn set_interceptors( &mut self, interceptors: impl Iterator<Item = SharedInterceptor>, ) -> &mut Self { self.interceptors.clear(); se...
rust
rust
macro-heavy
awslabs/aws-sdk-rust
sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
Apache-2.0
a0ddad15fca029a888f717b770fda078541546c4
github
sdk
https://github.com/awslabs/aws-sdk-rust/blob/a0ddad15fca029a888f717b770fda078541546c4/sdk/aws-smithy-runtime-api/src/client/runtime_components.rs
641
700