sig
type ty =
[ `Application
| `Audio
| `Ietf_token of string
| `Image
| `Message
| `Multipart
| `Text
| `Video
| `X_token of string ]
type subty =
[ `Iana_token of string | `Ietf_token of string | `X_token of string ]
type value = [ `String of string | `Token of string ]
type field = [ `ContentType of Rfc2045.content ]
type content =
Rfc2045.content = {
ty : MrMime_contentType.ty;
subty : MrMime_contentType.subty;
parameters : (string * MrMime_contentType.value) list;
}
val pp_ty : Format.formatter -> MrMime_contentType.ty -> unit
val pp_subty : Format.formatter -> MrMime_contentType.subty -> unit
val pp_value : Format.formatter -> MrMime_contentType.value -> unit
val pp_parameter :
Format.formatter -> string * MrMime_contentType.value -> unit
val pp : Format.formatter -> MrMime_contentType.content -> unit
val default : MrMime_contentType.content
module Encoder :
sig
val w_type :
(MrMime_contentType.ty,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Wrap.k1
val w_subtype :
(MrMime_contentType.subty,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Wrap.k1
val w_value :
(MrMime_contentType.value,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Wrap.k1
val w_parameter :
(string * MrMime_contentType.value,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Wrap.k1
val w_content :
(MrMime_contentType.content,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Wrap.k1
val w_field :
(MrMime_contentType.field,
([> `Partial of Bytes.t * int * int * (int -> 'a) ] as 'a)
Encoder.partial)
Encoder.k1
end
module Decoder :
sig val p_content : MrMime_contentType.content MrMime_parser.t end
val of_string : ?chunk:int -> string -> MrMime_contentType.content option
val of_string_raw :
?chunk:int ->
string -> int -> int -> (MrMime_contentType.content * int) option
end