Skip to main content

Densor

Trait Densor 

Source
pub trait Densor {
    // Required methods
    fn densor_id(&self) -> &str;
    fn densor_kind(&self) -> DensorKind;
    fn evidence_hash(&self) -> [u8; 32];
    fn verify(&self) -> Result<(), DensorError>;
}
Expand description

A sealed, self-verifying evidence object.

Required Methods§

Source

fn densor_id(&self) -> &str

A stable, non-empty identifier.

Source

fn densor_kind(&self) -> DensorKind

The densor’s coarse kind (routing/inventory only).

Source

fn evidence_hash(&self) -> [u8; 32]

The 32-byte evidence hash this densor seals to.

Source

fn verify(&self) -> Result<(), DensorError>

Re-derive the seal and confirm it matches (tamper-evident). Implementors must check densor_id is non-empty and that a freshly computed seal equals Densor::evidence_hash.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§