package mrmime

  1. Overview
  2. Docs

Module Content_type.ParametersSource

Sourcemodule Map : sig ... end
Sourcetype key = string

Type of parameter key.

Sourcetype value = [
  1. | `String of string
  2. | `Token of string
]

Type of parameter value.

Type of parameters.

Sourceval of_list : (key * value) list -> t

Make t from an association list.

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

key v makes a new key (according to RFC 2045 - otherwise, it returns an error).

Sourceval key_exn : string -> key
Sourceval k : string -> key
Sourceval value : string -> (value, [> `Msg of string ]) result

value v makes a new value (according to RFC 2045 - otherwise, it returns an error).

Sourceval value_exn : string -> value
Sourceval v : string -> value
Sourceval empty : t

Empty parameters.

Sourceval mem : key -> t -> bool

mem key t returns true if key exists in t. Otherwise, it retunrs false.

Sourceval add : key -> value -> t -> t

add key value t adds key binded with value in t.

Sourceval singleton : key -> value -> t

singleton key value makes a new t with key binded with value.

Sourceval remove : key -> t -> t

delete key t deletes key and binded value from t.

Sourceval find : key -> t -> value option

find key t returns value binded with key in t.

Sourceval iter : (key -> value -> unit) -> t -> unit

iter f t applies f on any bindings availables in t.

Sourceval pp_key : Format.formatter -> key -> unit

Pretty-printer of key.

Sourceval pp_value : Format.formatter -> value -> unit

Pretty-printer of value.

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

Pretty-printers of t.

Sourceval compare : t -> t -> int

Comparison on t.

Sourceval equal : t -> t -> bool

Equal on t.

Sourceval default : t

Same as empty.

Sourceval to_list : t -> (key * value) list