package core_kernel

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

This module extends Base.Bytes.

type t = Base.Bytes.t
include sig ... end
val bin_t : t Bin_prot.Type_class.t
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (Base.Int.t -> t) Bin_prot.Read.reader
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_shape_t : Bin_prot.Shape.t
val typerep_of_t : t Typerep_lib.Std.Typerep.t
val typename_of_t : t Typerep_lib.Std.Typename.t
include module type of struct include Base.Bytes end with type t := t
val t_of_sexp : Base__.Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Base__.Ppx_sexp_conv_lib.Sexp.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 validate_lbound : min:t Base__.Maybe_bound.t -> t Base__.Validate.check
val validate_ubound : max:t Base__.Maybe_bound.t -> t Base__.Validate.check
val validate_bound : min:t Base__.Maybe_bound.t -> max:t Base__.Maybe_bound.t -> t Base__.Validate.check
val of_string : string -> t
val to_string : t -> string
val pp : Base__.Formatter.t -> t -> unit
module To_string = Bytes.To_string
module From_string = Bytes.From_string
val create : int -> t
val make : int -> 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 fill : t -> pos:int -> len:int -> char -> unit
val tr : target:char -> replacement:char -> t -> unit
val to_list : t -> char list
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 shrinker : t 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.