pub enum Onboarding {
Connecting,
Asking {
device: String,
},
Denied {
device: String,
},
AlreadyPending {
device: String,
},
GaveUp(String),
Reauthorizing {
device: String,
was_expired: bool,
},
}Expand description
Where this device stands on its way to a first delta.
Worth showing to a caller directly: approval can take minutes, and an interface that stays empty in the meantime is indistinguishable from a broken one.
Variants§
Connecting
Listening for the server, or opening the connection to one.
Asking
Waiting for a human to approve this device, under the name it asked as.
Denied
The administrator looked and said no.
AlreadyPending
The server already holds a request under this name that this run
has no way to poll – typically a stray one left over from an
earlier run whose own record of it was lost. Unlike Self::Asking,
this run will not notice an approval on its own; deciding it on
the server clears the way, but this run itself needs a restart to
try again after that.
GaveUp(String)
Gave up before ever connecting, in log words rather than translated – there is no small set of reasons to enumerate here, only whatever the network or the server said.
The token this installation held was refused with 401 Unauthorized, discarded, and a fresh request just went out under
the same name.
Fields
What the fresh request is going out under.
Whether the discarded token’s own exp claim said it had
already expired, read before it was thrown away. false also
covers a token with no expiry claim at all, refused for some
other reason – revoked by the administrator, most likely –
that only the server’s own log would show; a 401 alone
cannot tell the two apart.
Trait Implementations§
Source§impl Clone for Onboarding
impl Clone for Onboarding
Source§fn clone(&self) -> Onboarding
fn clone(&self) -> Onboarding
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 Onboarding
impl Debug for Onboarding
impl Eq for Onboarding
Source§impl PartialEq for Onboarding
impl PartialEq for Onboarding
Source§fn eq(&self, other: &Onboarding) -> bool
fn eq(&self, other: &Onboarding) -> bool
self and other values to be equal, and is used by ==.