include sig ... endval hash_fold_t : Ppx_hash_lib.Std.Hash.state ‑> t ‑> Ppx_hash_lib.Std.Hash.stateval hash : t ‑> Ppx_hash_lib.Std.Hash.hash_valueval bin_t : t Bin_prot.Type_class.tval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int ‑> t) Bin_prot.Read.readerval bin_reader_t : t Bin_prot.Type_class.readerval bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_writer_t : t Bin_prot.Type_class.writerval bin_shape_t : Bin_prot.Shape.tval t_of_sexp : Sexplib.Sexp.t ‑> tval sexp_of_t : t ‑> Sexplib.Sexp.tval empty : unit ‑> tval of_bigbuffer : Core.Bigbuffer.t ‑> t Core.Or_error.tThe cost depends on the encoding of the content and the main media type.
N = Size of the message H = Size of the headers of the sub-message(s)
Format: time complexity, memory complexity
. | 7bit, 8bit, binary | Base64, Quoted_printable ------------------------------------------------------------- message | O(N), O(H) | O(N), O(N) multipart | O(N), O(H) | O(N), O(N) other | O(1), O(1) | O(N), O(N)
Where other is any other main media type: text, image, application...
Encoding and type can be obtained from the headers, using the modules Headers.Content_type and Headers.Content_transfer_encoding, and the corresponding default values.
module Multipart : sig ... endmodule Content : sig ... endval last_header : ?whitespace:Headers.Whitespace.t ‑> t ‑> Headers.Name.t ‑> Headers.Value.t optionval find_all_headers : ?whitespace:Headers.Whitespace.t ‑> t ‑> Headers.Name.t ‑> Headers.Value.t listval add_header : ?whitespace:Headers.Whitespace.t ‑> t ‑> name:Headers.Name.t ‑> value:Headers.Value.t ‑> tval add_headers : ?whitespace:Headers.Whitespace.t ‑> t ‑> (Headers.Name.t * Headers.Value.t) list ‑> tval set_header : ?whitespace:Headers.Whitespace.t ‑> t ‑> name:Headers.Name.t ‑> value:Headers.Value.t ‑> tval add_header_at_bottom : ?whitespace:Headers.Whitespace.t ‑> t ‑> name:Headers.Name.t ‑> value:Headers.Value.t ‑> tval add_headers_at_bottom : ?whitespace:Headers.Whitespace.t ‑> t ‑> (Headers.Name.t * Headers.Value.t) list ‑> tval set_header_at_bottom : ?whitespace:Headers.Whitespace.t ‑> t ‑> name:Headers.Name.t ‑> value:Headers.Value.t ‑> tval filter_headers : ?whitespace:Headers.Whitespace.t ‑> t ‑> f:(name:Headers.Name.t ‑> value:Headers.Value.t ‑> bool) ‑> tval map_headers : ?whitespace:Headers.Whitespace.t ‑> t ‑> f:(name:Headers.Name.t ‑> value:Headers.Value.t ‑> Headers.Value.t) ‑> tval map_data : t ‑> f:(Octet_stream.t ‑> Octet_stream.t) ‑> tAllow changing the message content to mask the actual data but retain the structure
String-builder-like module. Small-to-no memory overhead when unparsed.
val to_bigstring : t ‑> Core.Bigstring.tval of_bigstring : Core.Bigstring.t ‑> t Core.Or_error.tinclude Core.Sexpable.S with type t := tval t_of_sexp : Base__.Sexplib.Sexp.t ‑> tval sexp_of_t : t ‑> Base__.Sexplib.Sexp.tinclude Core.Comparable.S with type t := tinclude Core_kernel__.Comparable_intf.S_commoninclude Base.Comparable_intf.Sinclude Base.Comparable_intf.Polymorphic_compareascending is identical to compare. descending x y = ascending y x. These are
intended to be mnemonic when used like List.sort ~cmp:ascending and List.sort
~cmp:descending, since they cause the list to be sorted in ascending or descending
order, respectively.
clamp_exn t ~min ~max returns t', the closest value to t such that
between t' ~low:min ~high:max is true.
Raises if not (min <= max).
val clamp : t ‑> min:t ‑> max:t ‑> t Base.Or_error.tinclude Base.Comparator.S with type t := tval comparator : (t, comparator_witness) Base.Comparator.comparatorinclude Base.Comparable_intf.Validate with type t := tval validate_lbound : min:t Base.Maybe_bound.t ‑> t Base.Validate.checkval validate_ubound : max:t Base.Maybe_bound.t ‑> t Base.Validate.checkval validate_bound : min:t Base.Maybe_bound.t ‑> max:t Base.Maybe_bound.t ‑> t Base.Validate.checkmodule Replace_polymorphic_compare : Core_kernel__.Comparable_intf.Polymorphic_compare with type t := tmodule Map : Core_kernel__.Core_map.S with type Key.t = t with type Key.comparator_witness = comparator_witnessmodule Set : Core_kernel__.Core_set.S with type Elt.t = t with type Elt.comparator_witness = comparator_witnessinclude Core.Binable.S with type t := tinclude Bin_prot.Binable.S_only_functions with type t := tval bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int ‑> t) Bin_prot.Read.readerThis function only needs implementation if t exposed to be a polymorphic variant.
Despite what the type reads, this does *not* produce a function after reading;
instead it takes the constructor tag (int) before reading and reads the rest of the
variant t afterwards.
val bin_shape_t : Bin_prot.Shape.tval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval bin_t : t Bin_prot.Type_class.tmodule Simple : sig ... end