Module Core_kernel.Bytes
This module extends Base.Bytes
.
type t
= Core_kernel__.Import.bytes
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 variantt
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
val bin_t : t Bin_prot.Type_class.t
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
include module type of sig ... end with type t := t
val t_of_sexp : Base.Sexp.t -> t
val sexp_of_t : t -> Base.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
val invariant : t Base__.Invariant_intf.inv
module To_string = Base__Bytes.To_string
module From_string = Base__Bytes.From_string
val create : 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 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:'a -> f:('a -> char -> 'a) -> 'a
val foldi : t -> init:'a -> f:(int -> 'a -> char -> 'a) -> 'a
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 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
val gen' : Core_kernel__.Import.char Quickcheck.Generator.t -> t Quickcheck.Generator.t
Like
gen
, but generate bytes with the given distribution of characters.
val gen_with_length : Core_kernel__.Import.int -> Core_kernel__.Import.char 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.