1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pub type Map<K, V> = Map;
pub type MapEntry<'a, K, V> = MapEntry;
/// Re-export the current version of `Schemars` used by `Okapi`.
pub use schemars;
/// Macro to crate an `okapi::Map` with a number of key-value pairs in it.
///
/// # Examples
///
/// ```rust
/// use okapi::Map;
/// use okapi::map;
///
/// let my_map = map!{
/// "user:read".to_owned() => "Ability to read user data".to_owned(),
/// "user:write".to_owned() => "Ability to write user data".to_owned(),
/// };
///
/// let mut control = Map::new();
/// control.insert("user:read".to_owned(),"Ability to read user data".to_owned());
/// control.insert("user:write".to_owned(),"Ability to write user data".to_owned());
///
/// assert_eq!(my_map, control);
/// ```