pub struct RetryConfigError { /* private fields */ }Expand description
Invalid retry configuration.
path stores the configuration key that failed when such context is
available. message stores the human-readable reason.
Implementations§
Source§impl RetryConfigError
impl RetryConfigError
Sourcepub fn invalid_value(
path: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn invalid_value( path: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a validation error for a retry option.
§Parameters
path: Configuration key or option name associated with the failure.message: Human-readable validation message.
§Returns
A new RetryConfigError.
§Errors
This function does not return errors.
Sourcepub fn from_config(path: impl Into<String>, source: ConfigError) -> Self
pub fn from_config(path: impl Into<String>, source: ConfigError) -> Self
Wraps an error returned by qubit-config.
§Parameters
path: Configuration key that was being read.source: Error returned byqubit-config.
§Returns
A new RetryConfigError that preserves the key and source message.
§Errors
This function does not return errors.
Trait Implementations§
Source§impl Clone for RetryConfigError
impl Clone for RetryConfigError
Source§fn clone(&self) -> RetryConfigError
fn clone(&self) -> RetryConfigError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetryConfigError
impl Debug for RetryConfigError
Source§impl Display for RetryConfigError
impl Display for RetryConfigError
Source§impl Error for RetryConfigError
impl Error for RetryConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ConfigError> for RetryConfigError
impl From<ConfigError> for RetryConfigError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Converts a qubit-config error into a retry configuration error.
§Parameters
source: Error returned byqubit-config.
§Returns
A RetryConfigError with the path carried by source when
available, or an empty path for config errors that do not include key
context.
§Errors
This function does not return errors.
Source§impl PartialEq for RetryConfigError
impl PartialEq for RetryConfigError
impl Eq for RetryConfigError
impl StructuralPartialEq for RetryConfigError
Auto Trait Implementations§
impl Freeze for RetryConfigError
impl RefUnwindSafe for RetryConfigError
impl Send for RetryConfigError
impl Sync for RetryConfigError
impl Unpin for RetryConfigError
impl UnsafeUnpin for RetryConfigError
impl UnwindSafe for RetryConfigError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.