MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / crdt_encoding_u8

Method crdt_encoding_u8

atomic-repository/src/repository/synthesis.rs:4722–4732  ·  view source on GitHub ↗

Convert a semantic Encoding to its storage byte (the same mapping the apply pass uses).

(encoding: Option<&atomic_core::change::Encoding>)

Source from the content-addressed store, hash-verified

4720 // Convert a semantic Encoding to its storage byte (the same mapping
4721 // the apply pass uses).
4722 fn crdt_encoding_u8(encoding: Option<&atomic_core::change::Encoding>) -> u8 {
4723 use atomic_core::change::Encoding;
4724 match encoding {
4725 None => 0,
4726 Some(Encoding::Utf8) => 1,
4727 Some(Encoding::Utf16Le) => 2,
4728 Some(Encoding::Utf16Be) => 3,
4729 Some(Encoding::Binary) => 4,
4730 Some(Encoding::Latin1) => 5,
4731 }
4732 }
4733
4734 // Verify one branch's staged leaf rows against the replay's expected
4735 // domain (review C1: exact token identity for the WHOLE closure

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected