package git

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

MakeEncoder makes a module which respects the interface S.ENCODER from a S.MINIENC.encoder. This module (instead MakeEncoder allocates one buffer from a size specified by the user. However this size must be a power of two.

Then, this encoder `Never fails but we define a concrete error type to allow the client to match on it - then, he can use asset false without fear.

Parameters

module M : sig ... end

Signature

type t = M.e
type init = int * M.e
type error = Error.never
type encoder
val pp_error : error Fmt.t
val default : init -> encoder
val eval : Cstruct.t -> encoder -> [ `Flush of encoder | `End of encoder * int | `Error of error ]
val flush : int -> int -> encoder -> encoder
val used : encoder -> int
OCaml

Innovation. Community. Security.