pub struct ActivationRequest {
pub request_id: Uuid,
pub fingerprint: HardwareFingerprint,
pub product_id: String,
pub requested_features: Vec<String>,
pub timestamp: DateTime<Utc>,
pub version: u8,
pub metadata: BTreeMap<String, String>,
pub checksum: Option<String>,
}Expand description
An activation request generated on an air-gapped machine
This struct contains all the information a licensing server needs to generate a license that will work on the requesting machine.
Fields§
§request_id: UuidUnique identifier for this request (UUID v4)
fingerprint: HardwareFingerprintHardware fingerprint of the requesting machine
product_id: StringProduct identifier (which product is being activated)
requested_features: Vec<String>Requested features (optional - server may grant subset)
timestamp: DateTime<Utc>When this request was created
version: u8Request format version (for future compatibility)
metadata: BTreeMap<String, String>Additional metadata (customer info, notes, etc.)
Uses BTreeMap for deterministic iteration order, which is critical for
consistent checksum computation.
checksum: Option<String>Checksum of the request data (for integrity verification) This is computed from the serialized request content
Implementations§
Source§impl ActivationRequest
impl ActivationRequest
Sourcepub fn builder() -> ActivationRequestBuilder
pub fn builder() -> ActivationRequestBuilder
Create a new activation request builder
Sourcepub fn load(path: &Path) -> Result<Self>
pub fn load(path: &Path) -> Result<Self>
Load an activation request from a file (auto-detects format)
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn from_bytes(data: &[u8]) -> Result<Self>
Parse an activation request from bytes (auto-detects format)
Sourcepub fn from_binary(data: &[u8]) -> Result<Self>
pub fn from_binary(data: &[u8]) -> Result<Self>
Parse from binary format
Sourcepub fn from_base64(text: &str) -> Result<Self>
pub fn from_base64(text: &str) -> Result<Self>
Parse from base64 text format
Sourcepub fn to_base64(&self) -> Result<String>
pub fn to_base64(&self) -> Result<String>
Export to base64 text format (suitable for email/copy-paste)
Sourcepub fn save_binary(&self, path: &Path) -> Result<()>
pub fn save_binary(&self, path: &Path) -> Result<()>
Save to a binary file
Sourcepub fn verify_integrity(&self) -> bool
pub fn verify_integrity(&self) -> bool
Verify the request’s integrity
Trait Implementations§
Source§impl Clone for ActivationRequest
impl Clone for ActivationRequest
Source§fn clone(&self) -> ActivationRequest
fn clone(&self) -> ActivationRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more