pub fn read_string(edn: &str) -> Result<Edn<'_>, Error>
Expand description
Examples found in repository?
More examples
examples/read_quotes.rs (line 33)
29 30 31 32 33 34 35 36 37 38 39 40
fn quotify(s: &str) -> Edn<'_> {
let (edn, rest) = edn::read(s).unwrap();
let edn = if edn == Edn::Symbol("'") {
Edn::List(vec![Edn::Symbol("quote"), edn::read_string(rest).unwrap()])
} else {
edn
};
let edn = wrap_quote(edn);
edn
}