Looking at the docs for Value:
pub enum Value {
Bool(bool),
Char(char),
Map(Map),
Number(Number),
Option(Option<Box<Value>>),
String(String),
Seq(Vec<Value>),
Unit,
}
I don't see how to get the name of a struct out, e.g. if I were to call from_str on the contents of example.ron, how would I get the string "Nested" out of it? My use case is the following: I want to have a field that could be one of many different structs. I'd like to parse into a ron Value, check the parsed struct name, then based on that name choose which actual T to pass to into_rust. I couldn't find this in the examples/docs.
Looking at the docs for Value:
I don't see how to get the name of a struct out, e.g. if I were to call
from_stron the contents ofexample.ron, how would I get the string "Nested" out of it? My use case is the following: I want to have a field that could be one of many different structs. I'd like to parse into a ron Value, check the parsed struct name, then based on that name choose which actualTto pass tointo_rust. I couldn't find this in the examples/docs.