gleamunison/namespace_codec

Canonical byte codecs for namespace snapshots and branch heads. This module knows data and refs, not branch mutation or storage policy.

Values

pub fn parse_bindings(
  bytes: BitArray,
) -> Result(dict.Dict(String, identity.DefinitionRef), Nil)
pub fn parse_head(
  bytes: BitArray,
) -> Result(
  #(
    String,
    Int,
    identity.DefinitionRef,
    option.Option(identity.DefinitionRef),
  ),
  Nil,
)
pub fn serialize_bindings(
  bindings: dict.Dict(String, identity.DefinitionRef),
) -> BitArray
pub fn serialize_head(
  branch: String,
  seq: Int,
  ns_ref: identity.DefinitionRef,
  prev: option.Option(identity.DefinitionRef),
) -> BitArray
✨ Search Document