sig
module Map :
sig
type key = String.t
type 'a t = 'a Map.Make(String).t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val max_binding : 'a t -> key * 'a
val choose : 'a t -> key * 'a
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
end
type raw =
Rfc2047.raw =
QuotedPrintable of string
| Base64 of MrMime_base64.Decoder.result
type unstructured =
[ `CR of int
| `CRLF
| `Encoded of string * MrMime_content.raw
| `LF of int
| `Text of string
| `WSP ] list
type field =
[ `Content of string * Rfc5322.unstructured
| `ContentDescription of Rfc5322.unstructured
| `ContentEncoding of Rfc2045.mechanism
| `ContentID of Rfc822.msg_id
| `ContentType of Rfc2045.content
| `MimeVersion of Rfc2045.version
| `Skip of string ]
type t = {
ty : MrMime_contentType.content;
encoding : MrMime_contentEncoding.mechanism;
version : MrMime_mimeVersion.version;
id : MrMime_msgID.msg_id option;
description : MrMime_content.unstructured option;
content : MrMime_content.unstructured list MrMime_content.Map.t;
unsafe : MrMime_content.unstructured list MrMime_content.Map.t;
skip : string list;
}
val pp_raw : Format.formatter -> Rfc2047.raw -> unit
val pp_unstructured :
Format.formatter -> MrMime_content.unstructured -> unit
val pp_field : Format.formatter -> MrMime_content.field -> unit
val pp : Format.formatter -> MrMime_content.t -> unit
val default : MrMime_content.t
module Encoder :
sig
val w_field :
(Rfc2045.field,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Encoder.k1
val w_field_version :
(Rfc2045.field_version,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Encoder.k1
val w_unsafe :
(Rfc2045.unsafe,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Encoder.k1
val w_skip :
(Rfc2045.skip,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Encoder.k1
val w_message :
(MrMime_content.t,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Encoder.k1
val w_part :
(MrMime_content.t,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Encoder.k1
end
module Decoder :
sig
val message :
([> `Content of string * Rfc5322.unstructured
| `ContentDescription of Rfc5322.unstructured
| `ContentEncoding of Rfc2045.mechanism
| `ContentID of Rfc822.msg_id
| `ContentType of Rfc2045.content
| `MimeVersion of Rfc2045.version ]
as 'a)
list -> (MrMime_content.t * 'a list) MrMime_parser.t
val part :
([> `Content of string * Rfc5322.unstructured
| `ContentDescription of Rfc5322.unstructured
| `ContentEncoding of Rfc2045.mechanism
| `ContentID of Rfc822.msg_id
| `ContentType of Rfc2045.content
| `Skip of string
| `Unsafe of string * Rfc5322.unstructured ]
as 'a)
list -> (MrMime_content.t * 'a list) MrMime_parser.t
end
end