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

Function encoding_to_u8

atomic-core/src/apply/file_ops.rs:830–839  ·  view source on GitHub ↗

Convert Encoding to u8 for storage.

(encoding: Option<&Encoding>)

Source from the content-addressed store, hash-verified

828
829/// Convert Encoding to u8 for storage.
830fn encoding_to_u8(encoding: Option<&Encoding>) -> u8 {
831 match encoding {
832 None => 0,
833 Some(Encoding::Utf8) => 1,
834 Some(Encoding::Utf16Le) => 2,
835 Some(Encoding::Utf16Be) => 3,
836 Some(Encoding::Binary) => 4,
837 Some(Encoding::Latin1) => 5,
838 }
839}
840
841// Low-Level Table Operations
842

Callers 3

apply_file_ops_batchedFunction · 0.85
apply_trunk_opFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected