10 releases
Uses new Rust 2024
new 0.2.5 | Apr 10, 2025 |
---|---|
0.2.4 | Apr 10, 2025 |
0.1.3 | Apr 8, 2025 |
#243 in Development tools
1,165 downloads per month
240KB
4.5K
SLoC
facet-trait
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:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Dependencies
~160KB