pub trait CallErrorExt {
// Required methods
fn is_clean_reject(&self) -> bool;
fn is_immediately_retryable(&self) -> bool;
}Expand description
Extension trait for error types to provide additional methods.
Required Methods§
Sourcefn is_clean_reject(&self) -> bool
fn is_clean_reject(&self) -> bool
Checks if the error is a clean reject. A clean reject means that there must be no state changes on the callee side.
Sourcefn is_immediately_retryable(&self) -> bool
fn is_immediately_retryable(&self) -> bool
Determines if the failed call can be retried immediately within the update method that’s handling the error, as opposed to relying on a background timer or heartbeat.
A return value of true indicates that an immediate retry might succeed, i.e., not result in another error.
However, the caller is responsible for ensuring that retries are safe in their specific context.
For idempotent methods, immediate retries are generally safe. For non-idempotent ones,
checking is_clean_reject before retrying is recommended.