introspectable

Crates.iointrospectable
lib.rsintrospectable
version0.5.0
sourcesrc
created_at2023-05-12 03:05:56.671183
updated_at2023-05-16 17:23:59.744286
descriptionBasic introspection via the Introspectable trait.
homepagehttps://github.com/peperworx/introspectable
repositoryhttps://github.com/peperworx/introspectable
max_upload_size
id862642
size14,800
Riley Wilton (wireboy5)

documentation

README

Introspectable

crates.io crates.io docs.rs

Provides extremely simple introspection through the Introspectable trait, which enables runtime type introspection. A derive macro is available through the crate introspectable_derive.

This crate only supports owned types, excepting specifically 'static lifetimes.

Example

#[macro_use]
extern crate introspectable_derive;

use introspectable::Introspectable;


#[derive(Introspectable)]
struct TestIntrospect {
    a: u32,
    b: &'static u32,
    c: [u128; 2]
}

fn main() {
    println!("{:?}", TestIntrospect::introspect());
}
Commit count: 16

cargo fmt