package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module extends Base.Bytes.

type t = Base.Bytes.t
include Bin_prot.Binable.S with type t := t
include Bin_prot.Binable.S_only_functions with type t := t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader

This function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.

val bin_shape_t : Bin_prot.Shape.t
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
include Typerep_lib.Typerepable.S with type t := t
val typerep_of_t : t Typerep_lib.Std_internal.Typerep.t
val typename_of_t : t Typerep_lib.Typename.t
val globalize : t -> t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val t_sexp_grammar : t Sexplib0.Sexp_grammar.t
val blit : (t, t) Base__Blit_intf.blit
val blito : (t, t) Base__Blit_intf.blito
val unsafe_blit : (t, t) Base__Blit_intf.blit
val sub : (t, t) Base__Blit_intf.sub
val subo : (t, t) Base__Blit_intf.subo
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
type comparator_witness = Base__Bytes.comparator_witness
val comparator : (t, comparator_witness) Base__Comparator.comparator
val of_string : string -> t
val to_string : t -> string
val pp : Base__.Formatter.t -> t -> unit
val invariant : t Base__Invariant_intf.inv
module To_string : sig ... end
module From_string : sig ... end
val create : int -> t
val create_local : int -> t
val make : int -> char -> t
val map : t -> f:(char -> char) -> t
val mapi : t -> f:(int -> char -> char) -> t
val copy : t -> t
val init : int -> f:(int -> char) -> t
val of_char_list : char list -> t
val length : t -> int
val get : t -> int -> char
val unsafe_get : t -> int -> char
val set : t -> int -> char -> unit
val unsafe_set : t -> int -> char -> unit
val unsafe_get_int64 : t -> int -> int64
val unsafe_set_int64 : t -> int -> int64 -> unit
val unsafe_get_int32 : t -> int -> int32
val unsafe_set_int32 : t -> int -> int32 -> unit
val unsafe_get_int16 : t -> int -> int
val unsafe_set_int16 : t -> int -> int -> unit
val fill : t -> pos:int -> len:int -> char -> unit
val tr : target:char -> replacement:char -> t -> unit
val tr_multi : target:string -> replacement:string -> (t -> unit) Base__.Staged.t
val to_list : t -> char list
val to_array : t -> char array
val fold : t -> init:'acc -> f:('acc -> char -> 'acc) -> 'acc
val foldi : t -> init:'acc -> f:(int -> 'acc -> char -> 'acc) -> 'acc
val contains : ?pos:int -> ?len:int -> t -> char -> bool
val max_length : int
val unsafe_to_string : no_mutation_while_string_reachable:t -> string
val unsafe_of_string_promise_no_mutation : string -> t
include Hexdump.S with type t := t
module Hexdump : sig ... end
include Quickcheckable.S with type t := t
val quickcheck_generator : t Base_quickcheck.Generator.t
val quickcheck_observer : t Base_quickcheck.Observer.t
val quickcheck_shrinker : t Base_quickcheck.Shrinker.t

Like gen, but generate bytes with the given distribution of characters.

val gen_with_length : Base.Int.t -> Base.Char.t Quickcheck.Generator.t -> t Quickcheck.Generator.t

Like gen', but generate bytes with the given length.

module Stable : sig ... end

Note that bytes is already stable by itself, since as a primitive type it is an integral part of the sexp / bin_io protocol. Bytes.Stable exists only to provide interface uniformity with other stable types.

OCaml

Innovation. Community. Security.