pub struct ClientBuilder<'a> {
region: &'a str,
compat: &'a CompatFlags,
proxy: &'a ProxyConfig,
credentials_provider: Option<SharedCredentialsProvider>,
notification_log: Option<NotificationLogHandle>,
}Expand description
Parameters needed to build one aws_sdk_s3::Client.
Separated from ClientPool so tests can construct clients directly
without standing up a pool.
Fields§
§region: &'a str§compat: &'a CompatFlags§proxy: &'a ProxyConfig§credentials_provider: Option<SharedCredentialsProvider>Optional explicit credentials provider. When None the SDK default
provider chain is used (env → profile → IMDSv2 → …).
notification_log: Option<NotificationLogHandle>Optional notification log to push compat-flag warnings into.
When None, warnings are only emitted via tracing::warn!.
Implementations§
Source§impl<'a> ClientBuilder<'a>
impl<'a> ClientBuilder<'a>
Sourcepub fn new(
region: &'a str,
compat: &'a CompatFlags,
proxy: &'a ProxyConfig,
) -> Self
pub fn new( region: &'a str, compat: &'a CompatFlags, proxy: &'a ProxyConfig, ) -> Self
Create a builder for the given region and compatibility flags.
Sourcepub fn credentials_provider(self, provider: SharedCredentialsProvider) -> Self
pub fn credentials_provider(self, provider: SharedCredentialsProvider) -> Self
Override the credential provider (useful in tests or for manual profiles).
Sourcepub fn notification_log(self, handle: NotificationLogHandle) -> Self
pub fn notification_log(self, handle: NotificationLogHandle) -> Self
Attach a notification log handle so compat-flag warnings are surfaced to the user through the in-app notification system (task 9).
When not set, warnings are logged via tracing::warn! only.
Auto Trait Implementations§
impl<'a> Freeze for ClientBuilder<'a>
impl<'a> !RefUnwindSafe for ClientBuilder<'a>
impl<'a> Send for ClientBuilder<'a>
impl<'a> Sync for ClientBuilder<'a>
impl<'a> Unpin for ClientBuilder<'a>
impl<'a> UnsafeUnpin for ClientBuilder<'a>
impl<'a> !UnwindSafe for ClientBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.