package mrmime

  1. Overview
  2. Docs
type t = [
  1. | `Ietf_token of string
  2. | `Iana_token of string
  3. | `X_token of string
]

Type of sub-type.

val ietf : string -> (t, [> `Msg of string ]) result

Sub-type defined by IETF.

val iana : Type.t -> string -> (t, [> `Msg of string ]) result

Sub-type from IANA database. Returns Error if sub-type is not a part of the IANA database.

val iana_exn : Type.t -> string -> t
val v : Type.t -> string -> t
val extension : string -> (t, [> `Msg of string ]) result

User-defined sub-type.

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

Pretty-printer of t.

val compare : t -> t -> int

Comparison on t.

val equal : t -> t -> bool

Equal on t.

val default : t

Default value of sub-type acccording to RFC 2045.

val to_string : t -> string
OCaml

Innovation. Community. Security.