| Crates.io | structable_derive |
| lib.rs | structable_derive |
| version | 0.3.4 |
| created_at | 2024-02-13 11:35:31.006916+00 |
| updated_at | 2025-08-11 10:32:14.510033+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 |
| size | 25,449 |
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>
}