pub struct StoredEvent {Show 14 fields
pub event_id: EventId,
pub session_id: String,
pub tenant_id: Option<String>,
pub parent_event_id: Option<EventId>,
pub actor: Option<String>,
pub kind: SessionEventKind,
pub payload: Value,
pub tags: Vec<String>,
pub headers: BTreeMap<String, String>,
pub ts_ms: i64,
pub ts: String,
pub record_hash: String,
pub prev_hash: Option<String>,
pub signed_by: Option<EventSignature>,
}Expand description
Event as persisted by the store, including assigned identifiers, timestamps, and optional Ed25519 signature material.
Fields§
§event_id: EventId§session_id: String§tenant_id: Option<String>§parent_event_id: Option<EventId>§actor: Option<String>§kind: SessionEventKind§payload: Value§headers: BTreeMap<String, String>§ts_ms: i64§ts: String§record_hash: StringHash of the canonical event bytes (sha256), prefixed with the
algorithm. Forms the chain links: each event’s hash is folded
into the next event’s prev_hash. A confidentiality projection
uses redacted:<canonical-source-hash> and cannot be authenticated
as the original row.
prev_hash: Option<String>Hash of the previous event’s record_hash, or None for the
genesis event.
signed_by: Option<EventSignature>Detached signature over the canonical event or receipt root. Cleared when a retrieval hook returns a redacted projection.
Implementations§
Source§impl StoredEvent
impl StoredEvent
Sourcepub fn identity(&self) -> Result<EventIdentity, EventIdentityError>
pub fn identity(&self) -> Result<EventIdentity, EventIdentityError>
Read producer identity from the signed canonical headers.
Sourcepub fn is_redacted_projection(&self) -> bool
pub fn is_redacted_projection(&self) -> bool
Whether this event is a confidentiality projection rather than the
signed canonical row. Projections retain the source hash after the
redacted: prefix but intentionally clear signed_by.
Sourcepub fn source_record_hash(&self) -> &str
pub fn source_record_hash(&self) -> &str
Canonical source hash for a redacted projection, or this event’s own record hash when no projection was required.
Trait Implementations§
Source§impl Clone for StoredEvent
impl Clone for StoredEvent
Source§fn clone(&self) -> StoredEvent
fn clone(&self) -> StoredEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more