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, [> Rresult.R.msg ]) Stdlib.result

Sub-type defined by IETF.

val iana : Type.t -> string -> (t, [> Rresult.R.msg ]) Stdlib.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, [> Rresult.R.msg ]) Stdlib.result

User-defined sub-type.

val pp : t Fmt.t

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