pub enum Unavailable {
NoKey,
Disabled,
Rejected {
status: u16,
kind: Option<String>,
},
Transport(String),
}Expand description
Why the account’s meters are absent.
None meters are a normal state — an opencode install without a Go
subscription has no key — so the fault cases are the ones worth a line on
the dashboard: “estimated locally” on its own cannot distinguish a missing
key from a refused one, and the console’s own numbers are what that section
exists to show.
Variants§
NoKey
No key in the environment and none in opencode’s auth file.
Disabled
--no-api: the account route was switched off on purpose.
Rejected
The endpoint refused the key. kind is its own word for why
(api_key_expired), which is the part a person can act on; status is
the HTTP status behind it.
Transport(String)
No network, a timeout, or a body that would not parse.
Implementations§
Trait Implementations§
Auto Trait Implementations§
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