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.sizerval bin_write_t : t Bin_prot.Write.writerval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int -> t) Bin_prot.Read.readerThis function only needs implementation if
texposed 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 varianttafterwards.
val bin_shape_t : Bin_prot.Shape.tval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval 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.tval 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 -> tval sexp_of_t : t -> Base.Sexp.tval blit : (t, t) Base__.Blit_intf.blitval blito : (t, t) Base__.Blit_intf.blitoval unsafe_blit : (t, t) Base__.Blit_intf.blitval sub : (t, t) Base__.Blit_intf.subval subo : (t, t) Base__.Blit_intf.suboval (>=) : t -> t -> boolval (<=) : t -> t -> boolval (=) : t -> t -> boolval (>) : t -> t -> boolval (<) : t -> t -> boolval (<>) : t -> t -> boolval equal : t -> t -> boolval compare : t -> t -> intval min : t -> t -> tval max : t -> t -> tval ascending : t -> t -> intval descending : t -> t -> intval between : t -> low:t -> high:t -> boolval clamp_exn : t -> min:t -> max:t -> tval 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.comparatorval validate_lbound : min:t Base.Maybe_bound.t -> t Base.Validate.checkval validate_ubound : max:t Base.Maybe_bound.t -> t Base.Validate.checkval validate_bound : min:t Base.Maybe_bound.t -> max:t Base.Maybe_bound.t -> t Base.Validate.checkval of_string : string -> tval to_string : t -> stringval pp : Base.Formatter.t -> t -> unitval invariant : t Base__.Invariant_intf.inv
module To_string = Base__Bytes.To_stringmodule From_string = Base__Bytes.From_stringval create : int -> tval make : int -> char -> tval map : t -> f:(char -> char) -> tval mapi : t -> f:(int -> char -> char) -> tval copy : t -> tval init : int -> f:(int -> char) -> tval of_char_list : char list -> tval length : t -> intval 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 -> unitval tr : target:char -> replacement:char -> t -> unitval tr_multi : target:string -> replacement:string -> (t -> unit) Base.Staged.tval to_list : t -> char listval to_array : t -> char arrayval fold : t -> init:'a -> f:('a -> char -> 'a) -> 'aval foldi : t -> init:'a -> f:(int -> 'a -> char -> 'a) -> 'aval contains : ?pos:int -> ?len:int -> t -> char -> boolval max_length : intval unsafe_to_string : no_mutation_while_string_reachable:t -> stringval unsafe_of_string_promise_no_mutation : string -> t
include Quickcheckable.S with type t := t
val quickcheck_generator : t Base_quickcheck.Generator.tval quickcheck_observer : t Base_quickcheck.Observer.tval quickcheck_shrinker : t Base_quickcheck.Shrinker.t
val gen' : Core_kernel__.Import.char Quickcheck.Generator.t -> t Quickcheck.Generator.tLike
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.tLike
gen', but generate bytes with the given length.
module Stable : sig ... endNote that
bytesis already stable by itself, since as a primitive type it is an integral part of the sexp / bin_io protocol.Bytes.Stableexists only to provide interface uniformity with other stable types.