Core_kernel.BlitThis module extends Base.Blit.
include module type of struct include Base.Blit endmodule type S = sig ... endmodule type S1 = sig ... endmodule type S_distinct = sig ... endmodule type S1_distinct = sig ... endmodule type S_to_string = sig ... endmodule type Sequence = sig ... endmodule type Sequence1 = sig ... endThere are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.
The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:
len > 0
&& src_pos >= 0
&& src_pos + len <= get_src_len src
&& dst_pos >= 0
&& dst_pos + len <= get_dst_len dstThe Make* functors also automatically create unit tests.
module Make (Sequence : sig ... end) : S with type t := Sequence.tMake is for blitting between two values of the same monomorphic type.
module Make_distinct (Src : Sequence) (Dst : sig ... end) : S_distinct with type src := Src.t with type dst := Dst.tMake_distinct is for blitting between values of distinct monomorphic types.
module Make_to_string (T : sig ... end) (To_bytes : S_distinct with type src := T.t with type dst := bytes) : S_to_string with type t := T.tMake1 is for blitting between two values of the same polymorphic type.
module Make1_generic (Sequence : Sequence1) : S1 with type 'a t := 'a Sequence.tMake1_generic is for blitting between two values of the same container type that's not fully polymorphic (in the sense of Container.Generic).
module type S_permissions = sig ... endmodule type S1_permissions = sig ... end