include_dir_as_map/
lib.rs

1#![forbid(unsafe_code)]
2
3#![doc = include_str!("../README.md")]
4
5use std::collections::HashMap;
6
7pub use proc_include_dir_as_map::include_dir_as_map;
8
9/// Maps the relative path of each file to its contents as a vector of bytes.
10pub type DirMap = HashMap<String, Vec<u8>>;
11
12#[cfg(test)]
13mod tests {
14    use crate::*;
15
16    #[test]
17    fn valid_macro_call() {
18        let dirmap: DirMap = include_dir_as_map!("$CARGO_MANIFEST_DIR/src");
19        let _bytes = dirmap.get("lib.rs").unwrap();
20    }
21}