pub enum EotError {
ApiKeyMissing(String),
InvalidTransform(String, String),
ProviderHttp {
status: u16,
url: String,
},
ProviderJson(String),
Http(Error),
Json(Error),
Io(Error),
Database(Error),
Other(String),
}Expand description
Top-level error enum. Each variant maps to a distinct failure domain so that callers can match on the kind of error rather than string-comparing.
Variants§
ApiKeyMissing(String)
An expected API key environment variable was not set.
InvalidTransform(String, String)
The user supplied a transform name that could not be parsed.
ProviderHttp
A provider returned a non-success HTTP status.
ProviderJson(String)
The provider response body could not be parsed.
Http(Error)
An underlying HTTP client error (connection refused, timeout, etc.).
Json(Error)
A JSON serialization / deserialization error.
Io(Error)
A standard I/O error (file not found, permission denied, etc.).
Database(Error)
SQLite database error from the experiment store.
Other(String)
An arbitrary error from external code that has not yet been migrated to
EotError. Used as a migration shim — new code should not add these.
Trait Implementations§
Source§impl Error for EotError
impl Error for EotError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for EotError
impl !RefUnwindSafe for EotError
impl Send for EotError
impl Sync for EotError
impl Unpin for EotError
impl UnsafeUnpin for EotError
impl !UnwindSafe for EotError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.