Crate urbit_ob

source ·
Expand description

Utilities for formatting and parsing Urbit’s @p and @q data types (patp/patq).

Enums

  • Parsing and Formatting errors

Constants

  • Ordered list of all prefixes. Use to lookup a prefix by numerical value.
  • Ordered list of all suffixes. Use to lookup a suffix by numerical value.

Statics

  • Map from prefix name to integer value. Use to validate a prefix or lookup the numeric value.
  • Map from suffix name to integer value. Use to validate a suffix or lookup the numeric value.

Functions

  • Convert a bignum (UBig) to a @p-encoded string.
  • Convert a bignum (UBig) into a @q-encoded string.
  • General formatter for @p and @q encoded strings.
  • Convert a Buffer into a @p-encoded string.
  • Convert a Buffer into a @q-encoded string.
  • Determine the ship class of a @p value.
  • Convert a decimal encoded string to a @q-encoded string.
  • Convert a decimal encoded string to a @q-encoded string.
  • Equality test for a @p and @q.
  • Convert a hex-encoded string to a @p-encoded string.
  • Convert a hex-encoded string to a @q-encoded string.
  • General validation for pat type values.
  • Validate a @p-encoded string.
  • Validate a @q-encoded string.
  • General parser for @p and @q values.
  • Convert an unsigned integer into a @p-encoded string.
  • Convert a @p-encoded string to a UBig
  • Convert a @p-encoded string to a decimal-encoded string.
  • Convert a @p-encoded string to a hex-encoded string.
  • Convert a @p-encoded string to a primitive integer
  • Parse a @p-encoded value into a vector of individual syllables
  • Convert an unsigned integer into a @q-encoded string.
  • Convert a @q-encoded string to a UBig
  • Convert a @q-encoded string to a decimal-encoded string.
  • Convert a @q-encoded string to a hex-encoded string.
  • Convert a @q-encoded string to a primitive integer
  • Parse a @q-encoded value into a vector of individual syllables
  • Get a prefix value with validation
  • Determine the parent of a @p value.
  • Validate the input as a prefix, and return a static copy
  • Validate the input as a suffix, and return a static copy
  • Get a suffix value with validation
  • Convert syllables into a buffer of their integer values.