pub enum InstallationDiscovery {
NotInstalled {
install_url: Url,
},
Indeterminate {
skipped: usize,
},
Installed(ReachableTargets),
}Expand description
What auth status and auth login show after a successful sign-in.
Variants§
NotInstalled
The credential is valid, GitHub reported nothing this client could not
describe, and still nothing is reachable: the App is installed nowhere,
or on nothing. 03-control-flows.md flow 1.1 requires the installation
URL here, and the URL is the remediation.
Indeterminate
Nothing is reachable, but at least one installation was skipped, so this client cannot tell “not installed” from “installed on something it could not describe”.
§Why this variant exists at all
Skipping an unnameable installation is the right trade — one odd
installation must not take down auth status for every other one — but
it was made silently, and the silence flipped a verdict. An account this
client cannot name, on the only installation the credential has, used
to collapse to InstallationDiscovery::NotInstalled, and auth status
then handed an already-installed operator the “install the App” URL. That
is a wrong remediation on the only authentication path there is,
contradicted by nothing louder than a warn! in a log the operator is
not reading.
So the skip stays and the verdict does not flip. There is deliberately no
install_url here: the whole point is that this client does not know
whether installing is the remedy, and offering the URL anyway would put
the wrong answer back one field over. f1 says “1 installation could not
be described” and stops there, which is true.
Installed(ReachableTargets)
The credential reaches at least one repository or organization. It may
still be an incomplete picture — see ReachableTargets::skipped.
Implementations§
Source§impl InstallationDiscovery
impl InstallationDiscovery
pub fn targets(&self) -> Option<&ReachableTargets>
Sourcepub fn install_url(&self) -> Option<&Url>
pub fn install_url(&self) -> Option<&Url>
The installation URL, and only when installing is actually the
remediation. See InstallationDiscovery::Indeterminate.
Trait Implementations§
Source§impl Clone for InstallationDiscovery
impl Clone for InstallationDiscovery
Source§fn clone(&self) -> InstallationDiscovery
fn clone(&self) -> InstallationDiscovery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstallationDiscovery
impl Debug for InstallationDiscovery
impl Eq for InstallationDiscovery
Source§impl PartialEq for InstallationDiscovery
impl PartialEq for InstallationDiscovery
impl StructuralPartialEq for InstallationDiscovery
Auto Trait Implementations§
impl Freeze for InstallationDiscovery
impl RefUnwindSafe for InstallationDiscovery
impl Send for InstallationDiscovery
impl Sync for InstallationDiscovery
impl Unpin for InstallationDiscovery
impl UnsafeUnpin for InstallationDiscovery
impl UnwindSafe for InstallationDiscovery
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.