Function mz_lowertest::parse_as_enum_or_struct
source ยท pub(crate) fn parse_as_enum_or_struct<I, C>(
first_arg: TokenTree,
rest_of_stream: &mut I,
type_name: &str,
rti: &ReflectedTypeInfo,
ctx: &mut C,
) -> Result<Option<String>, String>
Expand description
Converts stream into JSON if type_name
refers to an enum or struct
Returns Ok(Some(string))
if type_name
refers to an enum or struct, and
there are no stream conversion errors.
Returns Ok(None)
if type_name
does not refer to an enum or struct.