table_rex v0.10.0 TableRex.Cell
Defines a struct that represents a single table cell, and helper functions.
The align
field can be of:
:left
: left align text in the cell.:center
: center text in the cell.:right
: right align text in the cell.nil
: align text in cell according to column alignment.
Summary
Functions
Converts the passed value to be a normalised %Cell{} struct
Types
t :: %TableRex.Cell{align: term, color: term, value: term}
Functions
Specs
to_cell(TableRex.Cell.t) :: TableRex.Cell.t
Converts the passed value to be a normalised %Cell{} struct.
If a non %Cell{} struct is passed, this function returns a new
%Cell{} struct with the value
key set to the stringified binary
of the content passed in and any options passed are applied over
the normal struct defaults.
If a %Cell{} is passed in those with a binary entry for their value
key will pass straight through; all others will have their value
key
stringified before being passed through.