package swhid_core

  1. Overview
  2. Docs

Module to work with the scheme version of a swhid.

type t

The type of scheme versions.

val of_string : string -> (t, string) Stdlib.result

of_string s is Ok v if s is a valid scheme version, otherwise it is Error e.

val of_int : int -> (t, string) Stdlib.result

of_int n is Ok v if n is a valid scheme version, otherwise it is Error e.

val to_int : t -> int

to_int v is the representation of v as an integer.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt v prints v on formatter fmt.

val default : t

default is the default scheme version.