pub enum LicenseError {
Show 22 variants
KeyGenerationFailed {
reason: String,
},
InvalidPrivateKey {
reason: String,
},
InvalidPublicKey {
reason: String,
},
InvalidSignature,
SigningFailed {
reason: String,
},
Base64EncodingFailed {
reason: String,
},
Base64DecodingFailed {
reason: String,
},
JsonSerializationFailed {
reason: String,
},
JsonDeserializationFailed {
reason: String,
},
InvalidLicenseFormat {
reason: String,
},
UnsupportedLicenseVersion {
found: u32,
supported: String,
},
MissingRequiredField {
field_name: String,
},
LicenseExpired {
expiration_date: String,
},
LicenseNotYetValid {
valid_from: String,
},
IncompatibleSoftwareVersion {
current: String,
reason: String,
},
FeatureNotAllowed {
feature: String,
},
HostnameNotAllowed {
hostname: String,
},
MachineIdNotAllowed {
machine_id: String,
},
ConnectionLimitExceeded {
max_allowed: u32,
},
ConstraintValidationFailed {
constraint_name: String,
reason: String,
},
BuilderIncomplete {
missing_fields: String,
},
InvalidBuilderValue {
field: String,
reason: String,
},
}Expand description
The main error type for all rust-license-key operations.
This enum encompasses all possible errors that can occur when working with licenses, from cryptographic failures to validation issues.
Variants§
KeyGenerationFailed
Failed to generate a cryptographic key pair.
InvalidPrivateKey
The provided private key is invalid or malformed.
InvalidPublicKey
The provided public key is invalid or malformed.
InvalidSignature
The cryptographic signature is invalid.
SigningFailed
Failed to sign the license data.
Base64EncodingFailed
Failed to encode data to Base64.
Base64DecodingFailed
Failed to decode Base64 data.
JsonSerializationFailed
Failed to serialize data to JSON.
JsonDeserializationFailed
Failed to deserialize JSON data.
InvalidLicenseFormat
The license format is invalid or corrupted.
UnsupportedLicenseVersion
The license version is not supported by this library version.
Fields
MissingRequiredField
A required field is missing from the license.
LicenseExpired
The license has expired.
LicenseNotYetValid
The license is not yet valid (future start date).
IncompatibleSoftwareVersion
The current software version is not compatible with this license.
Fields
FeatureNotAllowed
The requested feature or plugin is not allowed by this license.
HostnameNotAllowed
The current hostname is not allowed by this license.
MachineIdNotAllowed
The current machine identifier is not allowed by this license.
ConnectionLimitExceeded
The maximum number of concurrent connections has been exceeded.
ConstraintValidationFailed
A custom constraint validation failed.
Fields
BuilderIncomplete
The license builder is missing required fields.
InvalidBuilderValue
An invalid value was provided to the builder.