gleamunison/identity
Types
Opaque hash type. No access to the inner bytes outside this module.
pub opaque type Hash
Values
pub fn hash_bytes(contents: BitArray) -> Hash
Compute a SHA-256 hash from arbitrary bytes.
pub fn hash_from_bytes(contents: BitArray) -> Hash
pub fn hash_to_bytes(h: Hash) -> BitArray
pub fn hash_to_debug_string(h: Hash) -> String
Produce a hex string for display/debugging.
pub fn hash_to_short_string(h: Hash) -> String
Produce a short hash prefix for display.
pub fn hex_to_bytes(hex: String) -> BitArray
pub fn local_var_index(lv: LocalVar) -> Int
Extract the index from a LocalVar (de Bruijn index).