package plebeia

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Cstruct end
type buffer = (char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t
type t = private Cstruct.t = {
  1. buffer : buffer;
  2. off : int;
  3. len : int;
}
type byte = char
val byte : int -> byte
type uint8 = int
type uint16 = int
type uint32 = int32
type uint64 = int64
val empty : t
val of_bigarray : ?off:int -> ?len:int -> buffer -> t
val to_bigarray : t -> buffer
val create : int -> t
val create_unsafe : int -> t
val of_string : ?allocator:(int -> t) -> ?off:int -> ?len:int -> string -> t
val of_bytes : ?allocator:(int -> t) -> ?off:int -> ?len:int -> bytes -> t
val of_hex : ?off:int -> ?len:int -> string -> t
val equal : t -> t -> bool
val compare : t -> t -> int
val byte_to_int : byte -> int
val check_bounds : t -> int -> bool
val check_alignment : t -> int -> bool
val get_char : t -> int -> char
val get_uint8 : t -> int -> uint8
val set_char : t -> int -> char -> unit
val set_uint8 : t -> int -> uint8 -> unit
val sub : t -> int -> int -> t
val sub_copy : t -> int -> int -> t
val shift : t -> int -> t
val copy : t -> int -> int -> string
  • deprecated this is just like [to_string] without defaults, were you looking for [sub_copy]?
val blit : t -> int -> t -> int -> int -> unit
val blit_from_string : string -> int -> t -> int -> int -> unit
val blit_from_bytes : bytes -> int -> t -> int -> int -> unit
val blit_to_bytes : t -> int -> bytes -> int -> int -> unit
val memset : t -> int -> unit
val split : ?start:int -> t -> int -> t * t
val to_string : ?off:int -> ?len:int -> t -> string
val to_hex_string : ?off:int -> ?len:int -> t -> string
val to_bytes : ?off:int -> ?len:int -> t -> bytes
module BE = Xcstruct.BE
module LE = Xcstruct.LE
module HE = Xcstruct.HE
val hexdump : t -> unit
val hexdump_to_buffer : Stdlib.Buffer.t -> t -> unit
val hexdump_pp : Stdlib.Format.formatter -> t -> unit
val debug : t -> string
val lenv : t list -> int
val copyv : t list -> string
val fillv : src:t list -> dst:t -> int * t list
val shiftv : t list -> int -> t list
type !'a iter = unit -> 'a option
val iter : (t -> int option) -> (t -> 'a) -> t -> 'a iter
val fold : ('b -> 'a -> 'b) -> 'a iter -> 'b -> 'b
val append : t -> t -> t
val concat : t list -> t
val rev : t -> t
val get : t -> int -> char
val get_byte : t -> int -> int
val string : ?off:int -> ?len:int -> string -> t
val buffer : ?off:int -> ?len:int -> buffer -> t
val start_pos : t -> int
val stop_pos : t -> int
val length : t -> int
val head : ?rev:bool -> t -> char option
val tail : ?rev:bool -> t -> t
val is_empty : t -> bool
val is_prefix : affix:t -> t -> bool
val is_suffix : affix:t -> t -> bool
val is_infix : affix:t -> t -> bool
val for_all : (char -> bool) -> t -> bool
val exists : (char -> bool) -> t -> bool
val start : t -> t
val stop : t -> t
val trim : ?drop:(char -> bool) -> t -> t
val span : ?rev:bool -> ?min:int -> ?max:int -> ?sat:(char -> bool) -> t -> t * t
val take : ?rev:bool -> ?min:int -> ?max:int -> ?sat:(char -> bool) -> t -> t
val drop : ?rev:bool -> ?min:int -> ?max:int -> ?sat:(char -> bool) -> t -> t
val cut : ?rev:bool -> sep:t -> t -> (t * t) option
val cuts : ?rev:bool -> ?empty:bool -> sep:t -> t -> t list
val fields : ?empty:bool -> ?is_sep:(char -> bool) -> t -> t list
val find : ?rev:bool -> (char -> bool) -> t -> t option
val find_sub : ?rev:bool -> sub:t -> t -> t option
val filter : (char -> bool) -> t -> t
val filter_map : (char -> char option) -> t -> t
val map : (char -> char) -> t -> t
val mapi : (int -> char -> char) -> t -> t
val sum_lengths : caller:string -> t list -> int
include module type of struct include Cstruct.LE end
val get_uint16 : Cstruct.t -> int -> Cstruct.uint16
val get_uint64 : Cstruct.t -> int -> Cstruct.uint64
val set_uint16 : Cstruct.t -> int -> Cstruct.uint16 -> unit
val set_uint64 : Cstruct.t -> int -> Cstruct.uint64 -> unit
val max_uint32 : int
val get_uint32 : Cstruct.t -> int -> int
val set_uint32 : Cstruct.t -> int -> int -> unit
val get_index : Cstruct.t -> int -> Index.t
val set_index : Cstruct.t -> int -> Index.t -> unit
val encode_index : Index.t -> string
val decode_index : string -> Index.t
val write_string : string -> t -> int -> int -> unit
OCaml

Innovation. Community. Security.