aws_smithy_runtime/client/
retries.rs1pub mod classifiers;
8
9pub mod strategy;
11
12mod client_rate_limiter;
13mod token_bucket;
14
15use aws_smithy_types::config_bag::{Storable, StoreReplace};
16use std::fmt;
17
18pub use client_rate_limiter::ClientRateLimiter;
19pub use token_bucket::TokenBucket;
20
21pub use client_rate_limiter::ClientRateLimiterPartition;
22use std::borrow::Cow;
23
24#[non_exhaustive]
26#[derive(Clone, Debug, Hash, PartialEq, Eq)]
27pub struct RetryPartition {
28 name: Cow<'static, str>,
29}
30
31impl RetryPartition {
32 pub fn new(name: impl Into<Cow<'static, str>>) -> Self {
34 Self { name: name.into() }
35 }
36}
37
38impl fmt::Display for RetryPartition {
39 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
40 f.write_str(&self.name)
41 }
42}
43
44impl Storable for RetryPartition {
45 type Storer = StoreReplace<RetryPartition>;
46}