structable_derive

Crates.iostructable_derive
lib.rsstructable_derive
version
sourcesrc
created_at2024-02-13 11:35:31.006916+00
updated_at2025-04-22 10:08:42.138332+00
descriptionDerive macros for the StructTable trait (structable crate)
homepagehttps://github.com/gtema/structable
repositoryhttps://github.com/gtema/structable
max_upload_size
id1138423
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Artem Goncharov (gtema)

documentation

README

StructTable derive macro

Most likely you do not want to use this crate directly. It is a helper for the OpenStack

This crate implements derive macros for converting structures (or structure vectors) as tables (vector of vector of strings - as rows and columns).

use structable_derive::StructTable;
#[derive(Serialize, StructTable)]
struct User {
    #[structable(title = "ID")]
    id: u64,
    first_name: &'static str,
    last_name: &'static str,
    #[structable(title = "Long(only in wide mode)", wide)]
    extra: &'static str,
    #[structable(optional, pretty)]
    complex_data: Option<Value>
}
Commit count: 0

cargo fmt