package mrmime

  1. Overview
  2. Docs
type t = [
  1. | `Group of Group.t
  2. | `Mailbox of Mailbox.t
]

Type of address, an address may either be an individual mailbox, or a group of mailboxes.

val group : Group.t -> t

group g returns an address from a Group.t.

val mailbox : Mailbox.t -> t

mailbox m returns an address from a Mailbox.t.

Equals.

val equal : t -> t -> bool

Equal function of t.

Pretty-printers.

val pp : t Fmt.t

Pretty-printer of t.

Encoder of address.

module Encoder : sig ... end

Unstructured cast.

val addresses_to_unstructured : field_name:Field_name.t -> t list -> Unstructured.t

addresses_to_unstructured ~field_name addresses map a list of addresses to an Unstructured.t value. Should never fail - in this case, it raises a Failure.

val to_unstructured : field_name:Field_name.t -> t -> Unstructured.t

to_unstructured ~field_name t map an address (eg. t) to an Unstructured.t value. Should never fail - in this case, it raises a Failure.

OCaml

Innovation. Community. Security.