Function adapton::parse_val::parse_val [] [src]

pub fn parse_val<V: Debug>(v: &V) -> Val

Transform most(*) Rust data that derives Debug into a reflected Val.

This parsing logic handles user-defined struct and enum types, tuples and vectors. It recognizes the Debug output of these structures and parses them into trees of type Val. Importantly, it recognizes articulations in this Debug output and parses those into reflected locations (of type Loc) and articulations (of type Art). The reflected DCG maps reflected articulations (whose reflected locations are of type Loc) to reflected nodes that contain more reflected values.

(*) Note: Though this parsing logic handles vectors, tuples and user-defined data types, this parsing logic is probably incomplete for all of Rust's standard collections. (It does not yet handle HashMap<_,_> debug output, or anything else of this complexity as of yet).