Expand description
ttygrid provides functionality for displaying table-ized text to users with appropriate padding and width management. With ttygrid, you merely need to feed it your data, some information about the precedence (called a “priority”) of each column, and it will automatically determine what to show to the user based on the available display width. See crate::grid! for more information.
Here is a demo to see the results in action.
It is not intended for streaming (aka, not tty) situations. It probably only works on unix right now too.
The demo example
some basic capabilities and should be reviewed for understanding this library; as well as
learning the macros.
Much of this library relies on the macros, not the types directly. Please review those for the most comprehensive documentation.
Macros§
- add_
line - add_line defines a crate::GridLine with crate::GridItems attached.
- grid
- grid defines a crate::TTYGrid full of headers, which are associated with lines.
- header
- header defines a crate::SafeGridHeader for use with the crate::TTYGrid.
Structs§
- Grid
Header - GridHeader encapsulates the properties of a header, such as priority and padding information. This is typically constructed by crate::header! and is not constructed directly.
- Grid
Item - GridItem is the encapsulation of a piece of content. It is usually created by invoking crate::add_line! and is not instantiated directly.
- Grid
Line - A collection of grid items. Usually instantiated by crate::add_line!.
- Header
List - HeaderList defines a list of headers. This is typically composed as a part of the process from crate::header! and crate::grid! and is not constructed directly.
- TTYGrid
- Usually constructed by crate::grid!, this is the outer object of the whole library, all things are held by it in some form. Please review the impl for methods which can be used to adjust the properties of the grid once created.