fn encode(
collection: &str,
rkey: &str,
record: &Value,
) -> Result<(String, Cid, Vec<u8>), RepoError>Expand description
Encodes a record, answering its tree key, its CID and its block.
This is where a record stops being JSON a server happens to hold and becomes a block with an identity: the CID is the sha-256 of the one canonical DAG-CBOR encoding of it.