pub struct RecordEnvelope {Show 16 fields
pub id: String,
pub owner_did: String,
pub author_did: String,
pub proxy_did: Option<String>,
pub epistemic_status: EpistemicStatus,
pub evidence_type: EvidenceType,
pub sensitivity: SensitivityClass,
pub asserted_time_unix: u32,
pub asserted_instant: Option<InstantBridge>,
pub valid_time_start_unix: Option<u32>,
pub valid_time_start_instant: Option<InstantBridge>,
pub valid_time_end_unix: Option<u32>,
pub valid_time_end_instant: Option<InstantBridge>,
pub predecessor_id: Option<String>,
pub blob_hash: Option<String>,
pub tombstone: bool,
}Expand description
A deterministic Record Envelope
Fields§
§id: String§owner_did: String§proxy_did: Option<String>§epistemic_status: EpistemicStatus§evidence_type: EvidenceType§sensitivity: SensitivityClass§asserted_time_unix: u32§asserted_instant: Option<InstantBridge>High-resolution instant (T71 bridge). Preferred over asserted_time_unix
when present; the u32 field is kept for backward-compatible deserialization.
valid_time_start_unix: Option<u32>§valid_time_start_instant: Option<InstantBridge>High-resolution valid-time start (T71 bridge). Preferred over
valid_time_start_unix when present.
valid_time_end_unix: Option<u32>§valid_time_end_instant: Option<InstantBridge>High-resolution valid-time end (T71 bridge). Preferred over
valid_time_end_unix when present.
predecessor_id: Option<String>§blob_hash: Option<String>§tombstone: boolImplementations§
Source§impl RecordEnvelope
impl RecordEnvelope
Sourcepub fn compile_to_quins(&self, out: &mut [NQuin]) -> usize
pub fn compile_to_quins(&self, out: &mut [NQuin]) -> usize
Zero-allocation compiler: writes the envelope Quins into the provided slice. Returns the number of Quins written.
Sourcepub fn asserted_instant(&self) -> InstantBridge
pub fn asserted_instant(&self) -> InstantBridge
Resolve the asserted instant, preferring the high-resolution
InstantBridge field when present and falling back to the coarse
u32 Unix seconds otherwise (T71 bridge).
Sourcepub fn valid_time_start_instant(&self) -> Option<InstantBridge>
pub fn valid_time_start_instant(&self) -> Option<InstantBridge>
Resolve the valid-time start instant, preferring the high-resolution
InstantBridge field when present and falling back to the coarse
u32 Unix seconds otherwise (T71 bridge).
Sourcepub fn valid_time_end_instant(&self) -> Option<InstantBridge>
pub fn valid_time_end_instant(&self) -> Option<InstantBridge>
Resolve the valid-time end instant, preferring the high-resolution
InstantBridge field when present and falling back to the coarse
u32 Unix seconds otherwise (T71 bridge).
Sourcepub fn with_asserted_instant(
id: &str,
owner_did: &str,
author_did: &str,
epistemic_status: EpistemicStatus,
evidence_type: EvidenceType,
sensitivity: SensitivityClass,
asserted: &InstantBridge,
blob_hash: Option<String>,
) -> RecordEnvelope
pub fn with_asserted_instant( id: &str, owner_did: &str, author_did: &str, epistemic_status: EpistemicStatus, evidence_type: EvidenceType, sensitivity: SensitivityClass, asserted: &InstantBridge, blob_hash: Option<String>, ) -> RecordEnvelope
Create a RecordEnvelope with an InstantBridge for asserted time (T71 bridge).
Sourcepub fn with_instants(
id: &str,
owner_did: &str,
author_did: &str,
epistemic_status: EpistemicStatus,
evidence_type: EvidenceType,
sensitivity: SensitivityClass,
asserted: &InstantBridge,
valid_start: Option<&InstantBridge>,
valid_end: Option<&InstantBridge>,
blob_hash: Option<String>,
) -> RecordEnvelope
pub fn with_instants( id: &str, owner_did: &str, author_did: &str, epistemic_status: EpistemicStatus, evidence_type: EvidenceType, sensitivity: SensitivityClass, asserted: &InstantBridge, valid_start: Option<&InstantBridge>, valid_end: Option<&InstantBridge>, blob_hash: Option<String>, ) -> RecordEnvelope
Create a RecordEnvelope with InstantBridges for asserted and valid time (T71 bridge).
Sourcepub fn valid_time_duration(&self) -> Option<DurationBridge>
pub fn valid_time_duration(&self) -> Option<DurationBridge>
The duration of the valid time window (T71 bridge).
Trait Implementations§
Source§impl Clone for RecordEnvelope
impl Clone for RecordEnvelope
Source§fn clone(&self) -> RecordEnvelope
fn clone(&self) -> RecordEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more