package mrmime

  1. Overview
  2. Docs

Module Mrmime.Field_nameSource

Sourcetype t = private string

Type of field name.

Sourceval compare : t -> t -> int

Comparison function on t.

Sourceval equal : t -> t -> bool

Equal function on t.

Sourceval capitalize : t -> t

capitalize t capitalizes t - any letter in front of '-' will be a capital letter.

Sourceval canonicalize : t -> t

canonicalize t apply String.lowercase_ascii on t.

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

Pretty-printer of t.

Sourceval of_string : string -> (t, [ `Msg of string ]) result

of_string s tries to return a field-name. s must respect standards. Otherwise, we return an Error.

Sourceval of_string_exn : string -> t

Same as of_string but raises an Invalid_argument instead of returning Error.

Sourceval v : string -> t

Alias of of_string_exn.

Sourceval prefixed_by : string -> t -> bool

of_prefixed_by prefix t returns true if t is prefixed by s:

  prefixed_by "Resent" resent_date ;;
  - : bool = true

Decoder of field name.

Sourcemodule Decoder : sig ... end

Encoder of field name.

Sourcemodule Encoder : sig ... end

Helpers.

RFC 5322 Field names.

Sourceval date : t
Sourceval from : t
Sourceval sender : t
Sourceval reply_to : t
Sourceval cc : t
Sourceval bcc : t
Sourceval subject : t
Sourceval message_id : t
Sourceval in_reply_to : t
Sourceval references : t
Sourceval comments : t
Sourceval keywords : t
Sourceval received : t
Sourceval return_path : t

RFC 2045 Field names.

Sourceval content_type : t
Sourceval content_encoding : t
Sourceval mime_version : t
Sourceval content_id : t
Sourceval content_description : t

Resent Field names.

Sourceval resent_date : t
Sourceval resent_from : t
Sourceval resent_sender : t
Sourceval resent_to : t
Sourceval resent_cc : t
Sourceval resent_bcc : t
Sourceval resent_message_id : t
Sourceval resent_reply_to : t
Sourcemodule Map : Map.S with type key = t
OCaml

Innovation. Community. Security.