#table #format #cli #serialization #open-stack #wide

macro structable_derive

Derive macros for the StructTable trait (structable crate)

11 releases

new 0.3.1 Apr 22, 2025
0.3.0 Apr 16, 2025
0.2.1 Apr 13, 2025
0.1.6 Mar 30, 2025
0.1.2 Feb 26, 2024

#11 in #wide

Download history 7/week @ 2025-01-07 3/week @ 2025-01-14 7/week @ 2025-01-28 10/week @ 2025-02-04 3/week @ 2025-02-11 17/week @ 2025-02-18 32/week @ 2025-02-25 24/week @ 2025-03-04 18/week @ 2025-03-11 5/week @ 2025-03-18 114/week @ 2025-03-25 57/week @ 2025-04-01 397/week @ 2025-04-08 375/week @ 2025-04-15

943 downloads per month
Used in 3 crates

Apache-2.0

18KB
239 lines

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>
}

Dependencies

~0.5–1MB
~22K SLoC