Skip to main content

get_metadata_container_value_shape

Function get_metadata_container_value_shape 

Source
pub fn get_metadata_container_value_shape(
    shape: &Shape,
) -> Option<&'static Shape>
Expand description

Extract the inner value shape from a metadata container.

For a struct marked with #[facet(metadata_container)], this returns the shape of the first non-metadata field (the actual value being wrapped).

This is useful when you need to look through a metadata wrapper (like a user-defined Spanned<T> or Documented<T>) to determine the actual type being wrapped, such as when matching untagged enum variants against scalar values.

Returns None if the shape is not a metadata container or has no value fields.