Shell: add Data_encoding.unit

This commit is contained in:
Grégoire Henry 2017-02-25 18:01:21 +01:00
parent a2f1b6c889
commit 639b4c0c5c
3 changed files with 4 additions and 0 deletions

View File

@ -427,6 +427,7 @@ module Encoding = struct
let null = make @@ Null let null = make @@ Null
let empty = make @@ Empty let empty = make @@ Empty
let unit = make @@ Ignore
let constant s = make @@ Constant s let constant s = make @@ Constant s
let bool = make @@ Bool let bool = make @@ Bool
let int8 = make @@ Int8 let int8 = make @@ Int8

View File

@ -33,6 +33,7 @@ val splitted : json:'a encoding -> binary:'a encoding -> 'a encoding
val null : unit encoding val null : unit encoding
val empty : unit encoding val empty : unit encoding
val unit : unit encoding
val constant : string -> unit encoding val constant : string -> unit encoding
val int8 : int encoding val int8 : int encoding
val uint8 : int encoding val uint8 : int encoding

View File

@ -25,6 +25,7 @@ val splitted : json:'a encoding -> binary:'a encoding -> 'a encoding
val null : unit encoding val null : unit encoding
val empty : unit encoding val empty : unit encoding
val unit : unit encoding
val constant : string -> unit encoding val constant : string -> unit encoding
val int8 : int encoding val int8 : int encoding
val int16 : int encoding val int16 : int encoding
@ -219,6 +220,7 @@ end
module Binary : sig module Binary : sig
val length : 'a encoding -> 'a -> int 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 read : 'a encoding -> MBytes.t -> int -> int -> (int * 'a) option
val write : 'a encoding -> 'a -> MBytes.t -> int -> int option val write : 'a encoding -> 'a -> MBytes.t -> int -> int option
val to_bytes : 'a encoding -> 'a -> MBytes.t val to_bytes : 'a encoding -> 'a -> MBytes.t