Crates.io | structable_derive |
lib.rs | structable_derive |
version | |
source | src |
created_at | 2024-02-13 11:35:31.006916+00 |
updated_at | 2025-04-22 10:08:42.138332+00 |
description | Derive macros for the StructTable trait (structable crate) |
homepage | https://github.com/gtema/structable |
repository | https://github.com/gtema/structable |
max_upload_size | |
id | 1138423 |
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` |
size | 0 |
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>
}