pub struct Record {
pub op: Op,
pub id: String,
pub at: u64,
pub body: Option<String>,
pub selectors: Option<Value>,
pub reply_to: Option<String>,
}Expand description
One line of one author’s log.
No author field, deliberately. The author is the log’s filename, which is a fact the
filesystem owns; a field would be a second source for the same thing and the two could
disagree.
Fields§
§op: Op§id: String§at: u64Unix epoch seconds.
A number rather than an RFC 3339 string: rendering one needs a calendar, and a number cannot be ambiguous about its timezone. It is also not what orders the log — position in the file does that, because the file is append-only and a clock is not trustworthy.
body: Option<String>§selectors: Option<Value>Carried through without interpretation.
Anchoring belongs to the extension, because the extension is what has a DOM. Storing selectors opaquely means a new selector type needs no daemon release, which matters when the two halves ship through different channels at different speeds.
reply_to: Option<String>