use std::time::Duration;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum ToolkitError {
#[error("circuit breaker is open (will retry after {retry_after:?})")]
CircuitOpen {
retry_after: Duration,
},
#[error("bulkhead is closed")]
BulkheadClosed,
#[error("retry exhausted after {attempts} attempts")]
RetryExhausted {
attempts: u32,
},
}