structable_derive

Crates.iostructable_derive
lib.rsstructable_derive
version0.3.4
created_at2024-02-13 11:35:31.006916+00
updated_at2025-08-11 10:32:14.510033+00
descriptionDerive macros for the StructTable trait (structable crate)
homepagehttps://github.com/gtema/structable
repositoryhttps://github.com/gtema/structable
max_upload_size
id1138423
size25,449
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: 35

cargo fmt