pub struct RetryBackend { /* private fields */ }Expand description
Decorator backend that retries transient failures with exponential backoff.
Implementations§
Source§impl RetryBackend
impl RetryBackend
Sourcepub fn max_retries(self, n: u32) -> Self
pub fn max_retries(self, n: u32) -> Self
Set the maximum number of retry attempts.
Sourcepub fn base_delay(self, d: Duration) -> Self
pub fn base_delay(self, d: Duration) -> Self
Set the base delay between retries (doubles each attempt).
Trait Implementations§
Source§impl Backend for RetryBackend
impl Backend for RetryBackend
Source§fn get(&self, url: &Url) -> Result<SecretString, Error>
fn get(&self, url: &Url) -> Result<SecretString, Error>
Fetch the secret at the given URL. Read more
Source§fn put(&self, url: &Url, value: &SecretString) -> Result<(), Error>
fn put(&self, url: &Url, value: &SecretString) -> Result<(), Error>
Store a secret at the given URL. Read more
Source§fn list(&self, url: &Url) -> Result<Vec<Entry>, Error>
fn list(&self, url: &Url) -> Result<Vec<Entry>, Error>
List entries matching the URL prefix or pattern. Read more
Source§fn delete(&self, url: &Url) -> Result<(), Error>
fn delete(&self, url: &Url) -> Result<(), Error>
Delete the secret at the given URL. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RetryBackend
impl !UnwindSafe for RetryBackend
impl Freeze for RetryBackend
impl Send for RetryBackend
impl Sync for RetryBackend
impl Unpin for RetryBackend
impl UnsafeUnpin for RetryBackend
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