pub enum ClientErrorCode {
Show 14 variants
LicenseNotFound,
LicenseExpired,
LicenseRevoked,
LicenseSuspended,
LicenseBlacklisted,
LicenseInactive,
AlreadyBound,
NotBound,
HardwareMismatch,
FeatureNotIncluded,
QuotaExceeded,
GracePeriodExpired,
InternalError,
Unknown,
}Expand description
Error codes returned by the Talos license server API.
These codes correspond to the server’s ClientErrorCode enum and allow
clients to handle specific error conditions without parsing error messages.
Variants§
LicenseNotFound
License key was not found in the database
LicenseExpired
License has expired
LicenseRevoked
License has been revoked
LicenseSuspended
License is suspended (may have grace period)
LicenseBlacklisted
License has been permanently blacklisted
LicenseInactive
License exists but is not in active state
AlreadyBound
License is already bound to a different device
NotBound
License is not bound to any device
HardwareMismatch
Request hardware ID doesn’t match bound device
FeatureNotIncluded
Requested feature is not included in license tier
QuotaExceeded
Usage quota has been exceeded
GracePeriodExpired
Cached grace period has expired, must go online
InternalError
Internal server error
Unknown
Unknown error code (forward compatibility)
Implementations§
Source§impl ClientErrorCode
impl ClientErrorCode
Sourcepub fn default_message(&self) -> &'static str
pub fn default_message(&self) -> &'static str
Returns a default human-readable message for this error code.
Sourcepub fn is_license_invalid(&self) -> bool
pub fn is_license_invalid(&self) -> bool
Returns true if this error indicates the license is invalid and cannot be used.
Sourcepub fn requires_online(&self) -> bool
pub fn requires_online(&self) -> bool
Returns true if this error might be resolved by going online.
Trait Implementations§
Source§impl Clone for ClientErrorCode
impl Clone for ClientErrorCode
Source§fn clone(&self) -> ClientErrorCode
fn clone(&self) -> ClientErrorCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientErrorCode
impl Debug for ClientErrorCode
Source§impl<'de> Deserialize<'de> for ClientErrorCode
impl<'de> Deserialize<'de> for ClientErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ClientErrorCode
impl Display for ClientErrorCode
Source§impl PartialEq for ClientErrorCode
impl PartialEq for ClientErrorCode
Source§impl Serialize for ClientErrorCode
impl Serialize for ClientErrorCode
impl Copy for ClientErrorCode
impl Eq for ClientErrorCode
impl StructuralPartialEq for ClientErrorCode
Auto Trait Implementations§
impl Freeze for ClientErrorCode
impl RefUnwindSafe for ClientErrorCode
impl Send for ClientErrorCode
impl Sync for ClientErrorCode
impl Unpin for ClientErrorCode
impl UnwindSafe for ClientErrorCode
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§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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.