docs/generated/contracts.mdgenerated from code
Reference · 2 min read
entry
Contracts: entry.
Read as
Source: crates/lvcs-doc/src/kinds/entry/mod.rs.
1/// Append `event`, a durable event's JSON (`lvcs_api::events::Event`,2/// discussion:owner/515), to the event ledger at its `address` (discussion:owner/514),3/// committed by `origin`'s signer at `origin.time_ms` and answered like an4/// edit: `DocOutput::Changed` with `req`, or `DocOutput::Rejected`5/// `Failed` when the document is of another kind or closed, or the event6/// isn't one this ledger takes ([`event_admissible`]). `author`7/// is whom it is for and `via` the plugin it is written through: the8/// signer and `None` under a grant that delegates to no plugin, the9/// grant's issuer and its plugin under a delegated one, which the caller10/// checks, since every node's verifier refuses an entry whose author or11/// plugin isn't its change's.12#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]13pub struct EntryAppend {14 pub req: RequestId,15 pub origin: Origin,16 pub author: PeerKey,17 #[serde(default, skip_serializing_if = "Option::is_none")]18 pub via: Option<String>,19 pub event: Value,20}2122/// One event as a ledger holds it: its author, the plugin it was written23/// through, the device its change's record names (discussion:owner/518: quorum24/// counts distinct signer and device), when (Unix milliseconds by its25/// writer's clock, in its change's second), and the event's canonical26/// JSON.27#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]28pub struct Stored {29 pub author: PeerKey,30 #[serde(default, skip_serializing_if = "Option::is_none")]31 pub via: Option<String>,32 #[serde(default, skip_serializing_if = "Option::is_none")]33 pub device: Option<crate::sync::DeviceKey>,34 pub at_ms: i64,35 pub event: Value,36}