package mrmime

  1. Overview
  2. Docs

Content-type module.

val is_qtext : char -> bool
val is_token : char -> bool
module Type : sig ... end
module Subtype : sig ... end
module Parameters : sig ... end
type t = {
  1. ty : Type.t;
  2. subty : Subtype.t;
  3. parameters : (string * Parameters.value) list;
}

Type of Content-Type value.

val default : t

Default Content-Type value according to RFC 2045.

val make : Type.t -> Subtype.t -> Parameters.t -> t

make ty subty params makes a new Content-Type value.

val ty : t -> Type.t

Return type of Content-Type value.

val subty : t -> Subtype.t

Return sub-type of Content-Type value.

val parameters : t -> (Parameters.key * Parameters.value) list

Returns parameters of Content-Type value.

val is_discrete : t -> bool
val is_multipart : t -> bool
val is_message : t -> bool
val with_type : t -> Type.t -> t
val with_subtype : t -> Subtype.t -> t
val with_parameter : t -> (Parameters.key * Parameters.value) -> t
val boundary : t -> string option

Pretty-printers.

val pp : t Fmt.t

Pretty-printer of t.

Equals.

val equal : t -> t -> bool

Equal of t.

Decoder of content-type.

module Decoder : sig ... end

Encoder of content-type.

module Encoder : sig ... end
OCaml

Innovation. Community. Security.