Skip to main content

resolved_unit

Function resolved_unit 

Source
pub fn resolved_unit(descriptor: &[u8], cell: &[u8]) -> Result<Option<String>>
Expand description

The unit of a cell’s value (7.1, units.md 3), from the descriptor and cell JSON texts.

Checks, in order: the cell (structure, canonical form; slices allowed), that the descriptor hashes to cell.fn_hash (E_FN_HASH_MISMATCH), the descriptor, then substitution. Returns None when the function does not return a number.