pub enum InventoryError {
RateLimited(RateLimited),
Cancelled,
Github(GithubError),
}Expand description
Everything an inventory read can fail with.
GithubError is carried through rather than flattened, because c2’s
taxonomy already separates the three outcomes f1 branches on — a rejected
credential, an authentication lockout, and a permissions refusal — and
re-deciding that here would give the product two answers to the same
question. The two variants added in front of it are the ones c2 explicitly
left to this layer.
Variants§
RateLimited(RateLimited)
GitHub is refusing further requests for now. Resolves by waiting.
Cancelled
The caller withdrew the request. Nothing is known about the target.
Github(GithubError)
Implementations§
Source§impl InventoryError
impl InventoryError
pub fn is_rate_limited(&self) -> bool
pub fn is_cancelled(&self) -> bool
Sourcepub fn rate_limited(&self) -> Option<&RateLimited>
pub fn rate_limited(&self) -> Option<&RateLimited>
The rate limit behind this failure, when there is one.
Sourcepub fn is_offline(&self) -> bool
pub fn is_offline(&self) -> bool
true when GitHub could not be reached at all, as opposed to answering
something unwelcome. e1’s offline handling turns on this distinction:
an outage retains running runners, while a rejection does not.
Trait Implementations§
Source§impl Debug for InventoryError
impl Debug for InventoryError
Source§impl Display for InventoryError
impl Display for InventoryError
Source§impl Error for InventoryError
impl Error for InventoryError
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()