[][src]Crate edn_rs

Re-exports

pub use edn::Error as EdnError;
pub use edn::Double;
pub use edn::Edn;
pub use edn::List;
pub use edn::Map;
pub use edn::Set;
pub use edn::Vector;
pub use serialize::Serialize;

Modules

edn

Edn type implementation

serialize

Serialization module for most possible types. Tuples are limited between (A, B) and (A, B, C, D, E, F), any other tuple needs to be implemented by the trait Serialize. This module requires #[macro_use] for structs.

Macros

edn

Macro to parse EDN into Rust Spec:

hmap

Creates a HashMap from a seq of $key => $value, hmap!{a => "b", c => "d"}

hset

Creates a HashSet from a seq of $x, set!{1, 2, 3, 4}

map

Creates a BTreeMap from a seq of $key => $value, map!{a => "b", c => "d"}

ser_struct

ser_struct! creates a struct with the serialization trait already implemented:

set

Creates a BTreeSet from a seq of $x, set!{1, 2, 3, 4}

Functions

json_to_edn

json_to_edn receives a json string and parses its common key-values to a regular EDN format. tested examples are:

parse_edn

parse_edn parses a EDN String into Edn