pub(crate) fn follow_shredded_path_element<'a>(
shredding_state: &BorrowedShreddingState<'a>,
path_element: &VariantPathElement<'_>,
cast_options: &CastOptions<'_>,
) -> Result<ShreddedPathStep<'a>>
Expand description
Given a shredded variant field – a (value?, typed_value?)
pair – try to take one path step
deeper. For a VariantPathElement::Field
, the step fails if there is no typed_value
at this
level, or if typed_value
is not a struct, or if the requested field name does not exist.
TODO: Support VariantPathElement::Index
? It wouldn’t be easy, and maybe not even possible.