fragmentation
Types
Who wrote the content. Who made the decision. Who holds the intent.
pub type Author {
Author(self: String)
}
Constructors
-
Author(self: String)
Who ran the process. Who executed. Who was the mechanism.
pub type Committer {
Committer(self: String)
}
Constructors
-
Committer(self: String)
A node in the possibility space.
pub type Fragment {
Shard(ref: Ref, witnessed: Witnessed, data: String)
Fragment(
ref: Ref,
witnessed: Witnessed,
data: String,
fragments: List(Fragment),
)
}
Constructors
-
Terminal: self-addressed, witnessed, carries data, stops.
-
Self-similar: self-addressed, witnessed, carries data, contains fragments.
The witness’s account of what happened.
pub type Message {
Message(self: String)
}
Constructors
-
Message(self: String)
When the observation happened. Opaque string: ISO 8601, epoch, logical clock.
pub type Timestamp {
Timestamp(self: String)
}
Constructors
-
Timestamp(self: String)
Values
pub fn fragment(
ref: Ref,
witnessed: Witnessed,
data: String,
fragments: List(Fragment),
) -> Fragment
Create a fragment. Self-similar, contains other fragments.
pub fn hash_fragment(frag: Fragment) -> String
Content-address a fragment: SHA-256 of its canonical serialization.
pub fn is_fragment(frag: Fragment) -> Bool
Check if a fragment is a fragment (non-terminal).
pub fn serialize(frag: Fragment) -> String
Deterministic canonical serialization of a fragment.
pub fn serialize_ref(r: Ref) -> String
Deterministic canonical serialization of a ref.
pub fn serialize_witnessed(m: Witnessed) -> String
Deterministic canonical serialization of a witness record.