Struct aws_sdk_sqs::config::timeout::TimeoutConfig
source · #[non_exhaustive]pub struct TimeoutConfig { /* private fields */ }
Expand description
Top-level configuration for timeouts
Example
use aws_smithy_types::timeout::TimeoutConfig;
let timeout_config = TimeoutConfig::builder()
.operation_timeout(Duration::from_secs(30))
.operation_attempt_timeout(Duration::from_secs(10))
.connect_timeout(Duration::from_secs(3))
.build();
assert_eq!(
timeout_config.operation_timeout(),
Some(Duration::from_secs(30))
);
assert_eq!(
timeout_config.operation_attempt_timeout(),
Some(Duration::from_secs(10))
);
assert_eq!(
timeout_config.connect_timeout(),
Some(Duration::from_secs(3))
);
Implementations§
source§impl TimeoutConfig
impl TimeoutConfig
sourcepub fn builder() -> TimeoutConfigBuilder
pub fn builder() -> TimeoutConfigBuilder
Returns a builder to create a TimeoutConfig
.
sourcepub fn to_builder(&self) -> TimeoutConfigBuilder
pub fn to_builder(&self) -> TimeoutConfigBuilder
Returns a builder equivalent of this TimeoutConfig
.
sourcepub fn into_builder(self) -> TimeoutConfigBuilder
pub fn into_builder(self) -> TimeoutConfigBuilder
Converts this TimeoutConfig
into a builder.
sourcepub fn disabled() -> TimeoutConfig
pub fn disabled() -> TimeoutConfig
Returns a timeout config with all timeouts disabled.
sourcepub fn connect_timeout(&self) -> Option<Duration>
pub fn connect_timeout(&self) -> Option<Duration>
Returns this config’s connect timeout.
The connect timeout is a limit on the amount of time it takes to initiate a socket connection.
sourcepub fn read_timeout(&self) -> Option<Duration>
pub fn read_timeout(&self) -> Option<Duration>
Returns this config’s read timeout.
The read timeout is the limit on the amount of time it takes to read the first byte of a response from the time the request is initiated.
sourcepub fn operation_timeout(&self) -> Option<Duration>
pub fn operation_timeout(&self) -> Option<Duration>
Returns this config’s operation timeout.
An operation represents the full request/response lifecycle of a call to a service. The operation timeout is a limit on the total amount of time it takes for an operation to be fully serviced, including the time for all retries that may have been attempted for it.
sourcepub fn operation_attempt_timeout(&self) -> Option<Duration>
pub fn operation_attempt_timeout(&self) -> Option<Duration>
Returns this config’s operation attempt timeout.
An operation represents the full request/response lifecycle of a call to a service. When retries are enabled, then this setting makes it possible to set a timeout for individual retry attempts (including the initial attempt) for an operation.
sourcepub fn has_timeouts(&self) -> bool
pub fn has_timeouts(&self) -> bool
Returns true if any of the possible timeouts are set.
Trait Implementations§
source§impl Clone for TimeoutConfig
impl Clone for TimeoutConfig
source§fn clone(&self) -> TimeoutConfig
fn clone(&self) -> TimeoutConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TimeoutConfig
impl Debug for TimeoutConfig
source§impl From<TimeoutConfig> for TimeoutConfigBuilder
impl From<TimeoutConfig> for TimeoutConfigBuilder
source§fn from(timeout_config: TimeoutConfig) -> TimeoutConfigBuilder
fn from(timeout_config: TimeoutConfig) -> TimeoutConfigBuilder
source§impl PartialEq<TimeoutConfig> for TimeoutConfig
impl PartialEq<TimeoutConfig> for TimeoutConfig
source§fn eq(&self, other: &TimeoutConfig) -> bool
fn eq(&self, other: &TimeoutConfig) -> bool
self
and other
values to be equal, and is used
by ==
.