pub struct ProfileFileTimeoutConfigProvider { /* private fields */ }
Expand description
Load timeout configuration properties from a profile file
This provider will attempt to load AWS shared configuration, then read timeout configuration properties from the active profile. Timeout values represent the number of seconds before timing out and must be non-negative floats or integers. NaN and infinity are also invalid. If at least one of these values is valid, construction will succeed.
Examples
Sets timeouts for the default
profile
[default]
connect_timeout = 1.0
read_timeout = 1.0
tls_negotiation_timeout = 0.5
api_call_attempt_timeout = 2
api_call_timeout = 3
Sets the connect_timeout
to 0.5 seconds if and only if the other
profile is selected.
[profile other]
connect_timeout = 0.5
This provider is part of the default timeout config provider chain.
Implementations
sourceimpl ProfileFileTimeoutConfigProvider
impl ProfileFileTimeoutConfigProvider
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new ProfileFileTimeoutConfigProvider
To override the selected profile, set the AWS_PROFILE
environment variable or use the Builder
.
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Builder
to construct a ProfileFileTimeoutConfigProvider
sourcepub async fn timeout_config(&self) -> Result<TimeoutConfig, TimeoutConfigError>
pub async fn timeout_config(&self) -> Result<TimeoutConfig, TimeoutConfigError>
Attempt to create a new TimeoutConfig
from a profile file.
Trait Implementations
sourceimpl Default for ProfileFileTimeoutConfigProvider
impl Default for ProfileFileTimeoutConfigProvider
sourcefn default() -> ProfileFileTimeoutConfigProvider
fn default() -> ProfileFileTimeoutConfigProvider
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ProfileFileTimeoutConfigProvider
impl Send for ProfileFileTimeoutConfigProvider
impl Sync for ProfileFileTimeoutConfigProvider
impl Unpin for ProfileFileTimeoutConfigProvider
impl UnwindSafe for ProfileFileTimeoutConfigProvider
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more