package containers

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

Module Containers_codegen.BitfieldSource

Generate efficient bitfields that fit in an integer

Sourcetype t
Sourceval make : ?emit_failure_if_too_wide:bool -> name:string -> unit -> t

Make a new bitfield with the given name.

  • parameter name

    the name of the generated type

  • parameter emit_failure_if_too_wide

    if true, generated code includes a runtime assertion that Sys.int_size is wide enough to support this type

Sourceval field_bit : t -> string -> unit
Sourceval field_int : t -> width:int -> string -> unit
Sourceval total_width : t -> int
Sourceval gen_mli : t -> code
Sourceval gen_ml : t -> code
OCaml

Innovation. Community. Security.