Macro yaml_peg::yaml_map [−][src]
macro_rules! yaml_map {
($($k : expr => $v : expr), * $(,) ?) => { ... };
}
Expand description
Create YamlBase::Map
items literally.
All items will convert to NodeBase
automatically.
use yaml_peg::{node, yaml_map, Yaml};
assert_eq!(
yaml_map! { "a" => "b", "c" => "d" },
Yaml::Map(vec![(node!("a"), node!("b")), (node!("c"), node!("d"))].into_iter().collect())
);