Skip to content

Peperworx/introspectable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());
}

About

Rust trait for struct and enum introspection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages