Struct bonsaidb::keystorage::s3::aws_sdk_s3::config::timeout::TimeoutConfig
#[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§
§impl TimeoutConfig
impl TimeoutConfig
pub fn builder() -> TimeoutConfigBuilder
pub fn builder() -> TimeoutConfigBuilder
Returns a builder to create a TimeoutConfig
.
pub fn to_builder(&self) -> TimeoutConfigBuilder
pub fn to_builder(&self) -> TimeoutConfigBuilder
Returns a builder equivalent of this TimeoutConfig
.
pub fn into_builder(self) -> TimeoutConfigBuilder
pub fn into_builder(self) -> TimeoutConfigBuilder
Converts this TimeoutConfig
into a builder.
pub fn disabled() -> TimeoutConfig
pub fn disabled() -> TimeoutConfig
Returns a timeout config with all timeouts disabled.
pub 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.
pub 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.
pub 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.
pub 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.
pub fn has_timeouts(&self) -> bool
pub fn has_timeouts(&self) -> bool
Returns true if any of the possible timeouts are set.
Trait Implementations§
§impl Clone for TimeoutConfig
impl Clone for TimeoutConfig
§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 more§impl Debug for TimeoutConfig
impl Debug for TimeoutConfig
§impl From<TimeoutConfig> for TimeoutConfigBuilder
impl From<TimeoutConfig> for TimeoutConfigBuilder
§fn from(timeout_config: TimeoutConfig) -> TimeoutConfigBuilder
fn from(timeout_config: TimeoutConfig) -> TimeoutConfigBuilder
§impl PartialEq for TimeoutConfig
impl PartialEq for TimeoutConfig
§fn eq(&self, other: &TimeoutConfig) -> bool
fn eq(&self, other: &TimeoutConfig) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Storable for TimeoutConfig
impl Storable for TimeoutConfig
§type Storer = StoreReplace<TimeoutConfig>
type Storer = StoreReplace<TimeoutConfig>
StoreReplace
] and [StoreAppend
]