table_to_html

Crates.iotable_to_html
lib.rstable_to_html
version0.4.0
sourcesrc
created_at2023-04-11 23:11:27.269003
updated_at2023-12-20 01:40:38.921269
descriptionThe library provides a interface to convert a `tabled::Table` into a HTML table (``).
homepagehttps://github.com/zhiburt/tabled
repositoryhttps://github.com/zhiburt/tabled
max_upload_size
id836410
size75,878
Maxim Zhiburt (zhiburt)

documentation

https://docs.rs/table_to_html

README

table_to_html

Provides a interface to build HTML <table>.

Get started

use table_to_html::HtmlTable;

fn main() {
    #[rustfmt::skip]
    let data = vec![
        ["0",  "INDIR", "",       "int sys_syscall(int number, ...)"],
        ["1",  "STD",   "",       "void sys_exit(int rval)"],
        ["2",  "STD",   "",       "int sys_fork(void)"],
        ["3",  "STD",   "NOLOCK", "ssize_t sys_read(int fd, void *buf, size_t nbyte)"],
        ["4",  "STD",   "NOLOCK", "ssize_t sys_write(int fd, const void *buf, size_t nbyte)"],
    ];

    let mut table = HtmlTable::new(data);
    table.set_border(3);

    println!("{table}")
}

<table>

Commit count: 1166

cargo fmt