pub fn shape_of<'a, T: Facet<'a>>() -> &'static ShapeExpand description
Returns the shape of a type as a function pointer.
This is a helper for lazy shape initialization in field definitions. Using a function pointer instead of a direct reference moves const evaluation from compile time to runtime, improving compile times.
§Example
ⓘ
use facet_core::{FieldBuilder, shape_of};
// In field definitions:
FieldBuilder::new("my_field", shape_of::<i32>, 0)