package tezos-protocol-environment

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-environment.structs/Tezos_protocol_environment_structs/V8/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.