diff --git a/src/minutils/data_encoding.ml b/src/minutils/data_encoding.ml index 2da130d06..1507196b9 100644 --- a/src/minutils/data_encoding.ml +++ b/src/minutils/data_encoding.ml @@ -427,6 +427,7 @@ module Encoding = struct let null = make @@ Null let empty = make @@ Empty + let unit = make @@ Ignore let constant s = make @@ Constant s let bool = make @@ Bool let int8 = make @@ Int8 diff --git a/src/minutils/data_encoding.mli b/src/minutils/data_encoding.mli index b0e84dc36..98adf1588 100644 --- a/src/minutils/data_encoding.mli +++ b/src/minutils/data_encoding.mli @@ -33,6 +33,7 @@ val splitted : json:'a encoding -> binary:'a encoding -> 'a encoding val null : unit encoding val empty : unit encoding +val unit : unit encoding val constant : string -> unit encoding val int8 : int encoding val uint8 : int encoding diff --git a/src/proto/environment/data_encoding.mli b/src/proto/environment/data_encoding.mli index 736ff8874..d13ff0e01 100644 --- a/src/proto/environment/data_encoding.mli +++ b/src/proto/environment/data_encoding.mli @@ -25,6 +25,7 @@ val splitted : json:'a encoding -> binary:'a encoding -> 'a encoding val null : unit encoding val empty : unit encoding +val unit : unit encoding val constant : string -> unit encoding val int8 : int encoding val int16 : int encoding @@ -219,6 +220,7 @@ end module Binary : sig val length : 'a encoding -> 'a -> int + val fixed_length : 'a encoding -> int option val read : 'a encoding -> MBytes.t -> int -> int -> (int * 'a) option val write : 'a encoding -> 'a -> MBytes.t -> int -> int option val to_bytes : 'a encoding -> 'a -> MBytes.t