pub enum RegistrationError {
AuthRejected(String),
KeyExpired,
NeedsLogin(Url),
NetworkUnreachable,
Timeout,
}Expand description
A typed registration outcome, distinguishing a permanent failure (don’t retry — tell the user) from a transient one (worth retrying).
This is the error surfaced by Runtime::wait_until_running,
replacing the previous “poll ipv4_addr until a deadline and report a generic timeout” workaround
with an actionable reason.
Variants§
AuthRejected(String)
Control rejected registration with a permanent reason — typically a bad, expired, or unknown auth key. The string is control’s verbatim reason. Permanent: re-pairing (a new auth key) is required; retrying with the same key will not succeed.
KeyExpired
The node key has expired. Permanent until re-authentication.
NeedsLogin(Url)
Interactive authorization is required: control offered an auth URL (no usable auth key).
Actionable but not permanent — direct the user to the URL; the runtime keeps retrying
registration and will reach Running once the user authorizes (so this is not
is_permanent). A caller using an auth key should not hit this; a
caller doing interactive auth should drive it via
watch_state rather than treating this as a hard failure.
NetworkUnreachable
The control plane was unreachable (network/transport error). Transient: retrying later may succeed.
Timeout
No settled state was reached before the caller’s timeout elapsed. Indeterminate: registration may still be in flight (e.g. slow control plane); the caller may retry the wait.
Implementations§
Source§impl RegistrationError
impl RegistrationError
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Whether this outcome is permanent — re-pairing / new credentials are required and
retrying as-is will not succeed (AuthRejected, KeyExpired). Everything else is not
permanent: NetworkUnreachable/Timeout are transient (retry may succeed), and NeedsLogin
is actionable-but-recoverable (the runtime keeps retrying and reaches Running once the user
authorizes the offered URL — so it is not permanent).
Trait Implementations§
Source§impl Clone for RegistrationError
impl Clone for RegistrationError
Source§fn clone(&self) -> RegistrationError
fn clone(&self) -> RegistrationError
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 RegistrationError
impl Debug for RegistrationError
Source§impl Display for RegistrationError
impl Display for RegistrationError
impl Eq for RegistrationError
Source§impl Error for RegistrationError
impl Error for RegistrationError
1.30.0 · 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()
Source§impl From<&Error> for RegistrationError
Map a control-layer ts_control::Error from the registration path into a typed
RegistrationError. Used by the control runner when its check_auth loop hard-fails.
impl From<&Error> for RegistrationError
Map a control-layer ts_control::Error from the registration path into a typed
RegistrationError. Used by the control runner when its check_auth loop hard-fails.
Source§fn from(e: &Error) -> RegistrationError
fn from(e: &Error) -> RegistrationError
Source§impl PartialEq for RegistrationError
impl PartialEq for RegistrationError
Source§fn eq(&self, other: &RegistrationError) -> bool
fn eq(&self, other: &RegistrationError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RegistrationError
Auto Trait Implementations§
impl Freeze for RegistrationError
impl RefUnwindSafe for RegistrationError
impl Send for RegistrationError
impl Sync for RegistrationError
impl Unpin for RegistrationError
impl UnsafeUnpin for RegistrationError
impl UnwindSafe for RegistrationError
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<T> DisplayExt for Twhere
T: Display,
impl<T> DisplayExt for Twhere
T: Display,
Source§fn as_display_debug(&self) -> DisplayToDebug<'_>
fn as_display_debug(&self) -> DisplayToDebug<'_>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<A, T> DynMessage<A> for T
impl<A, T> DynMessage<A> for T
Source§fn handle_dyn<'a>(
self: Box<T>,
state: &'a mut A,
actor_ref: ActorRef<A>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
stop: &'a mut bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
fn handle_dyn<'a>( self: Box<T>, state: &'a mut A, actor_ref: ActorRef<A>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, stop: &'a mut bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 moreimpl<T> ReplyError for T
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