package textutils

  1. Overview
  2. Docs

Module Ascii_table_kernel.ColumnSource

Sourcemodule Align : sig ... end
Sourcemodule Show : sig ... end
Sourcetype 'a t
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
Sourceval create : ?align:Align.t -> ?min_width:int -> ?max_width:int -> ?show:[ `Yes | `No | `If_not_empty ] -> string -> ('a -> string) -> 'a t

creates a column given the header and the to-string function

Sourceval create_attr : ?align:Align.t -> ?min_width:int -> ?max_width:int -> ?show:[ `Yes | `No | `If_not_empty ] -> string -> ('a -> Ansi_kernel.Attr.t list * string) -> 'a t

like create, except that the to_string function must provide a list of attributes.

Sourceval create_attrs : ?align:Align.t -> ?min_width:int -> ?max_width:int -> ?show:[ `Yes | `No | `If_not_empty ] -> string -> ('a -> (Ansi_kernel.Attr.t list * string) list) -> 'a t

like create_attr, except that you can specify many lines with different attributes.

Sourceval lift : 'a t -> f:('b -> 'a) -> 'b t
Sourceval optional : 'a t -> 'a option t
Sourceval align : _ t -> Align.t
Sourceval header : 'a t -> string
Sourceval show : _ t -> Show.t
Sourceval to_data : 'a t -> 'a -> (Ansi_kernel.Attr.t list * string) list
Sourceval update_header : f:(string -> string) -> 'a t -> 'a t
Sourceval update_show : f:(Show.t -> Show.t) -> 'a t -> 'a t
Sourcemodule Of_field : sig ... end

This module is used for constructing lists of 'a ts from a record's fields. The intention is to use Fields.to_list to obtain a list.

OCaml

Innovation. Community. Security.