pub enum AppError {
Io {
path: PathBuf,
source: Error,
},
IoBare(Error),
Credentials(String),
Transport(String),
Http {
status: u16,
body: String,
},
Schema(String),
Json(Error),
Toml(Error),
Other(String),
}Variants§
Io
Local I/O failed (cache write, credentials read, theme file, etc.).
IoBare(Error)
Generic I/O without a meaningful path (e.g. stdout writes).
Credentials(String)
A vendor’s credentials file is missing, unreadable, or malformed.
Distinct from Io because the widget treats it as “user must re-auth”
rather than a transient failure.
Transport(String)
HTTP request failed at the transport layer (DNS, TLS, timeout, connect).
Maps to claudebar’s “HTTP 000” — show Loading…, don’t write
.last_error, retry next tick.
Http
HTTP request reached the server but returned a non-2xx status.
Carries the code + best-effort body so the widget can populate
.last_error for the tooltip.
Schema(String)
API returned 2xx but the body did not match our expected schema. Treated like an HTTP error for tooltip purposes, but logged separately because it signals undocumented-endpoint drift.
Json(Error)
JSON serialization/deserialization failure (config files, response bodies).
Toml(Error)
TOML config parse failure.
Other(String)
Catch-all for unexpected conditions (cache lock contention, etc.).
Implementations§
Trait Implementations§
Source§impl Error for AppError
impl Error for AppError
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 !RefUnwindSafe for AppError
impl !UnwindSafe for AppError
impl Freeze for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl UnsafeUnpin for AppError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more