facet-trait 0.2.5

Core traits for the facet ecosystem
Documentation

experimental free of syn crates.io documentation MIT/Apache-2.0 licensed

Thanks to all individual and corporate sponsors, without whom this work could not exist:

Defines the core Facet trait that powers runtime reflection in the facet ecosystem.

The Facet Trait

The Facet trait is the foundation of facet's reflection system. Types that implement Facet:

  • Provide their memory layout information
  • Describe their structure (fields, variants, etc.)
  • Enable safe runtime manipulation
  • Can be safely type-erased and restored

Built-in Implementations

This crate provides Facet implementations for many standard library types:

  • Basic types (bool, integers, floats)
  • Collections (Vec, HashMap, etc.)
  • Smart pointers (Box, Rc, Arc)
  • Other common types (String, Option, Result)

These implementations make it easy to use facet with existing Rust code.

License

Licensed under either of:

at your option.