Function get_from

Source
pub fn get_from<'defs>(
    variants: &'defs VariantDefTop,
    name: &str,
) -> Result<&'defs Variant, VariantError>
Expand description

Get the variant with the specified name from the supplied data.

ยงErrors

  • VariantKind name parse errors, e.g. invalid name
  • an internal error if there is no data about a recognized variant name