embed_file

Macro embed_file 

Source
embed_file!() { /* proc-macro */ }
Expand description

Embed a local file in a tower Service.

embed_file!(path: &str) -> EmbeddedFileService;
embed_file!(dir: &str, path: &str) -> EmbeddedFileService;

This macro loads the specified file from the file system and embeds it within an EmbeddedFileService. The path is relative to your crate’s CARGO_MANIFEST_DIR. The modified timestamp is taken from the file’s metadata.