···349val to_string: ?off:int -> ?len:int -> t -> string
350(** [to_string ~off ~len t] will allocate a fresh OCaml [string] and copy the
351 contents of the cstruct starting at offset [off] (default [0]) of length
352- [len] (default [Cstruct.len t - off]) into it, and return that string.
353354 @raise Invalid_argument if [off] or [len] is negative, or
355- [Cstruct.len t - off] < [len]. *)
356357val to_hex_string : ?off:int -> ?len:int -> t -> string
358(** [to_hex_string ~off ~len t] is a fresh OCaml [string] containing
359 the hex representation of [sub t off len]. It is therefore of length
360 [2 * len]. This string can be read back into a Cstruct using {!of_hex}.
361 @raise Invalid_argument if [off] or [len] is negative, or
362- if [Cstruct.len t - off < len].
363 @since 6.2 *)
364365val to_bytes: ?off:int -> ?len:int -> t -> bytes
···349val to_string: ?off:int -> ?len:int -> t -> string
350(** [to_string ~off ~len t] will allocate a fresh OCaml [string] and copy the
351 contents of the cstruct starting at offset [off] (default [0]) of length
352+ [len] (default [Cstruct.length t - off]) into it, and return that string.
353354 @raise Invalid_argument if [off] or [len] is negative, or
355+ [Cstruct.length t - off] < [len]. *)
356357val to_hex_string : ?off:int -> ?len:int -> t -> string
358(** [to_hex_string ~off ~len t] is a fresh OCaml [string] containing
359 the hex representation of [sub t off len]. It is therefore of length
360 [2 * len]. This string can be read back into a Cstruct using {!of_hex}.
361 @raise Invalid_argument if [off] or [len] is negative, or
362+ if [Cstruct.length t - off < len].
363 @since 6.2 *)
364365val to_bytes: ?off:int -> ?len:int -> t -> bytes