module Bin_io_utils:sig
..end
'a
as a bin-io buffer. The advantages of storing a
value as an 'a t
rather than an 'a
are:'a t
is faster (it's just a blit) and it has the same bin-io
representation as 'a
.'a
itself you need to call value
, which
requires deserializing.
'a t
is safe in the sense that you cannot construct an 'a t
that doesn't store a
valid 'a
. When deserializing an 'a
, this requires actually constructing 'a
. If
you'd like access to the 'a
that's constructed during deserialization, see the
bin_reader_t_with_value
below.
val load : ?pos:Core.Std.Int64.t ->
?len:Core.Std.Int64.t -> string -> 'a Core.Std.Bin_prot.Read.reader -> 'a
val save : ?header:bool ->
?perm:Core.Std.Unix.file_perm ->
string -> 'a Core.Std.Bin_prot.Type_class.writer -> 'a -> unit
val to_line : 'a Core.Std.Bin_prot.Type_class.t -> 'a -> Core.Std.Bigstring.t
val of_line : string -> 'a Core.Std.Bin_prot.Type_class.t -> 'a
module Serialized:sig
..end