[][src]Function genco::prelude::swift::map

pub fn map<K, V>(key: K, value: V) -> Map where
    K: Into<TypeBox>,
    V: Into<TypeBox>, 

Setup a map.

Examples

use genco::prelude::*;

let toks = quote!(#(swift::map(swift::local("String"), swift::imported("Foo", "Debug"))));

assert_eq!(
    vec![
        "import Foo",
        "",
        "[String: Debug]",
    ],
    toks.to_file_vec().unwrap()
);