package tezos-protocol-environment

  1. Overview
  2. Docs
Interface layer between the protocols and the shell

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-environment.structs/Tezos_protocol_environment_structs/V9/Data_encoding/Encoding/Bounded/index.html

Module Encoding.BoundedSource

include module type of struct include Data_encoding.Encoding.Bounded end
Sourceval string' : ?length_kind:[ `N | `Uint30 | `Uint16 | `Uint8 ] -> Data_encoding.Encoding.string_json_repr -> int -> string Data_encoding.Encoding.encoding

Encoding of a string whose length does not exceed the specified length.

If length_kind is set, then it is used to encode the length of the string in a header. If length_kind is omitted then the length field uses the smallest fixed-width integer that can accommodate the maximum size - e.g., `Uint8 for very short strings, `Uint16 for longer strings, etc.

Attempting to construct a string with a length that is too long causes an Invalid_argument exception.

  • raises Invalid_argument

    if length_kind is set but it cannot accommodate the specified bound. E.g., Bounded.string' ~length_kind:`Uint8 Hex 1000 raises.

  • raises Invalid_argument

    if length_kind is unset and the specified bound is larger than 2^30.

Sourceval bytes' : ?length_kind:[ `N | `Uint30 | `Uint16 | `Uint8 ] -> Data_encoding.Encoding.string_json_repr -> int -> Bytes.t Data_encoding.Encoding.encoding

See string' above.

Sourceval string : ?length_kind:[ `N | `Uint16 | `Uint30 | `Uint8 ] -> Data_encoding.Encoding.string_json_repr -> int -> string Data_encoding.Encoding.encoding
Sourceval bytes : ?length_kind:[ `N | `Uint16 | `Uint30 | `Uint8 ] -> Data_encoding.Encoding.string_json_repr -> int -> Bytes.t Data_encoding.Encoding.encoding
OCaml

Innovation. Community. Security.