package core_extended

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

Module Immediate.StringSource

Sourcemodule type S = sig ... end

The default immediate string universe shares the default Immediate_interned_string universe.

include S with module Interned = Immediate__.Immediate_interned_string
include Immediate_kernel.S_no_option
Sourcetype t
include Ppx_hash_lib.Hashable.S with type t := t
Sourceval globalize : t -> t
include Core.Identifiable.S with type t := t
include Bin_prot.Binable.S with type t := t
include Bin_prot.Binable.S_only_functions with type t := t
Sourceval bin_size_t : t Bin_prot.Size.sizer
Sourceval bin_write_t : t Bin_prot.Write.writer
Sourceval bin_read_t : t Bin_prot.Read.reader
Sourceval __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.

Sourceval bin_shape_t : Bin_prot.Shape.t
include Ppx_hash_lib.Hashable.S with type t := t
include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
include Ppx_compare_lib.Comparable.S with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
include Base.Stringable.S with type t := t
Sourceval of_string : string -> t
Sourceval to_string : t -> string
include Base.Pretty_printer.S with type t := t
Sourceval pp : Base.Formatter.t -> t -> unit
include Core.Comparable.S_binable with type t := t
include Base.Comparable.S with type t := t
include Base.Comparisons.S with type t := t
include Base.Comparisons.Infix with type t := t
Sourceval (>=) : t -> t -> bool
Sourceval (<=) : t -> t -> bool
Sourceval (=) : t -> t -> bool
Sourceval (>) : t -> t -> bool
Sourceval (<) : t -> t -> bool
Sourceval (<>) : t -> t -> bool
Sourceval compare : t -> t -> int

compare t1 t2 returns 0 if t1 is equal to t2, a negative integer if t1 is less than t2, and a positive integer if t1 is greater than t2.

Sourceval min : t -> t -> t
Sourceval max : t -> t -> t
Sourceval ascending : t -> t -> int

ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.

Sourceval descending : t -> t -> int
Sourceval between : t -> low:t -> high:t -> bool

between t ~low ~high means low <= t <= high

Sourceval clamp_exn : t -> min:t -> max:t -> t

clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.

Raises if not (min <= max).

Sourceval clamp : t -> min:t -> max:t -> t Base.Or_error.t
include Base.Comparator.S with type t := t
Sourcetype comparator_witness
Sourceval validate_lbound : min:t Core.Maybe_bound.t -> t Validate.check
Sourceval validate_ubound : max:t Core.Maybe_bound.t -> t Validate.check
Sourceval validate_bound : min:t Core.Maybe_bound.t -> max:t Core.Maybe_bound.t -> t Validate.check
include Core.Hashable.S_binable with type t := t
include Ppx_hash_lib.Hashable.S with type t := t
Sourceval hash_fold_t : Base.Hash.state -> t -> Base.Hash.state
Sourceval hashable : t Base.Hashable.t
include Core.Equal.S with type t := t
include Core.Quickcheckable with type t := t
Sourceval quickcheck_generator : t Base_quickcheck.Generator.t
Sourceval quickcheck_observer : t Base_quickcheck.Observer.t
Sourceval quickcheck_shrinker : t Base_quickcheck.Shrinker.t

Lexicographic.compare x y = String.compare (to_string x) (to_string y)

Sourceval length : t -> int
Sourceval get : t -> int -> char
Sourceval of_char : char -> t
Sourceval mem : t -> char -> bool
include Core.Intable with type t := t
Sourceval of_int_exn : int -> t
Sourceval to_int_exn : t -> int
Sourceval unsafe_to_int : t -> int
Sourceval unsafe_of_int : int -> t
Sourceval empty : t
Sourceval is_empty : t -> bool
Sourceval unsafe_of_bigstring : pos:int -> len:int -> Core.Bigstring.t -> t
Sourceval of_iobuf_peek : ?pos:int -> ?len:int -> ([> Core.read ], _) Iobuf.t -> t
Sourceval of_iobuf_consume : ?len:int -> ([> Core.read ], Iobuf.seek) Iobuf.t -> t
Sourceval to_iobuf_poke : t -> ?pos:int -> (Core.read_write, _) Iobuf.t -> unit
Sourceval to_iobuf_fill : t -> (Core.read_write, Iobuf.seek) Iobuf.t -> unit
Sourcemodule Padded : sig ... end

WARNING: using the padded functions to convert to a bigstring / iobuf will ignore ~len arguments that are less than the length of the source t!

Sourceval unsafe_get : t -> int -> char
Sourceval unsafe_of_iobuf_peek : pos:int -> len:int -> ([> Core.read ], _) Iobuf.t -> t
Sourceval unsafe_of_iobuf_consume : len:int -> ([> Core.read ], Iobuf.seek) Iobuf.t -> t
Sourceval unsafe_to_iobuf_poke : t -> pos:int -> (Core.read_write, _) Iobuf.t -> unit
Sourceval unsafe_to_iobuf_fill : t -> (Core.read_write, Iobuf.seek) Iobuf.t -> unit
Sourceval unsafe_to_bigstring : t -> pos:int -> Core.Bigstring.t -> unit
Sourcemodule Stats : sig ... end
Sourceval grow_by : int -> unit

grow_by n ensures that the intern table can hold at least n additional entries without resizing (again). This is useful for applications which must not pause online for the (substantial) time required to rehash a large intern table.

Sourceval after_grow : (before:Core.Time_ns.t -> len_before:int -> len:int -> unit) -> unit

after_grow f registers a growth logger. f will be called immediately after every growth of the intern table, with the time and size before and the size after.

f would typically call Time_ns.now to learn the time after.

Sourcemodule Interned : sig ... end
Sourceval is_interned : t -> bool
Sourceval of_short_string : Immediate__.Immediate_short_string.t -> t
Sourceval of_interned_string : Interned.t -> t
Sourceval to_short_string_exn : t -> Immediate__.Immediate_short_string.t
Sourceval to_interned_string_exn : t -> Interned.t
Sourcemodule Stable : sig ... end
Sourcemodule Option : sig ... end
Sourceval of_local_string : string -> t
Sourceval to_local_string : t -> string
Sourceval of_string_no_intern : string -> Option.t
Sourceval of_immediate_string : t -> t
Sourceval to_immediate_string : t -> t
Sourcemodule Universe : sig ... end

Creating a new universe mints a new table of interned strings. See documentation on Immediate_interned_string.Universe.

OCaml

Innovation. Community. Security.