package containers-data

  1. Overview
  2. Docs

Module type CCBitField.SSource

Bitfield Signature

Sourcetype t = private int

Generative type of bitfields. Each instantiation of the functor should create a new, incompatible type

Sourceval empty : t

Empty bitfields (all bits 0).

Sourcetype field
Sourceval get : field -> t -> bool

Get the value of this field.

Sourceval set : field -> bool -> t -> t

Set the value of this field.

Sourceval mk_field : unit -> field

Make a new field.

Sourceval freeze : unit -> unit

Prevent new fields from being added. From now on, creating a field will raise Frozen.

Sourceval total_width : unit -> int

Current width of the bitfield.

OCaml

Innovation. Community. Security.