Skip to main content

PrimaryIdentifierReader

Trait PrimaryIdentifierReader 

Source
pub trait PrimaryIdentifierReader {
    // Required methods
    fn platform(&self) -> PlatformTag;
    fn read_primary_id(&self) -> Result<String, IdentifierError>;
}
Expand description

The per-platform seam: read this platform’s single primary identifier.

One identifier per platform, chosen for reinstall-stability, never a concatenated fingerprint (owner doc). The returned string is the primary_id fed verbatim into capsule_core::cohort::cohort_hash. Implementations must not log or otherwise surface the raw identifier; where the raw value is itself a stable device secret (Linux machine-id), the implementation returns a one-way-derived value instead.

Required Methods§

Source

fn platform(&self) -> PlatformTag

The platform this reader speaks for — becomes the closed platform_tag in the hash construction.

Source

fn read_primary_id(&self) -> Result<String, IdentifierError>

Read the platform’s primary identifier (already safe to hash: raw device secrets are pre-derived by the implementation).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§