pub unsafe trait Facet<'facet>: 'facet {
const SHAPE: &'static Shape;
}Expand description
Allows querying the Shape of a type, which in turn lets us inspect any fields, build a value of
this type progressively, etc.
The 'facet lifetime allows Facet to be derived for types that borrow from something else.
§Safety
If you implement this wrong, all the safe abstractions in facet-reflect,
all the serializers, deserializers, the entire ecosystem is unsafe.
You’re responsible for describing the type layout properly, and annotating all the invariants.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.