Source file email_raw_content.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Stable = struct
open! Core.Core_stable
module V1 = struct
type t = Bigstring_shared.Stable.V1.t option [@@deriving bin_io, sexp, compare]
end
end
open! Core
type t = Bigstring_shared.t option [@@deriving compare, hash, sexp_of]
let of_bigstring_shared bstr = Some bstr
let of_string str = of_bigstring_shared (Bigstring_shared.of_string str)
let to_bigstring_shared = function
| None -> Bigstring_shared.empty
| Some bstr -> bstr
;;
let length t = Bigstring_shared.length (to_bigstring_shared t)
module Expert = struct
let of_bigstring_shared_option = Fn.id
let to_bigstring_shared_option = Fn.id
end