Skip to content

Commit 55a0abe

Browse files
committed
Export Cstruct_cap.copy with a deprecation warning
1 parent bfdb629 commit 55a0abe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/cstruct_cap.mli

+4
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ val split : ?start:int -> 'a t -> int -> 'a t * 'a t
177177
@raise Invalid_argument if [start] exceeds the length of [t],
178178
or if there is a bounds violation of [t] via [len + start]. *)
179179

180+
val copy : 'a t -> int -> int -> string
181+
[@@ocaml.alert deprecated "this is just like [to_string] without defaults, were you looking for [sub_copy]?"]
182+
(** [copy cstr off len] is the same as [Cstruct.to_string cstr ~off ~len]. *)
183+
180184
(** {2 Construction from existing t} *)
181185

182186
val append : 'a rd t -> 'b rd t -> rdwr t

0 commit comments

Comments
 (0)