package tezos-protocol-environment

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.0.tar.gz
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b

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.