4 releases
0.0.4 | Nov 2, 2024 |
---|---|
0.0.3 | Nov 2, 2024 |
0.0.2 | Nov 2, 2024 |
0.0.1 | Nov 2, 2024 |
#1 in #lets
318 downloads per month
7KB
104 lines
Directorate
Provides a small but usable wrapper for the rust_embed crate, sometimes you want to use the rust Embed implement struct
as an object you can clone and pass around but the rust_embed Embed
interface has all it's method as non-attached (they do not use self)
so you cant really use them as an object you can pass around (I assume for performance reasons).
The directorate crate exists to attempt to provide a way to do so:
use directorate::Directorate;
#[derive(rust_embed::Embed, Default)]
#[folder = "test_directory/"]
struct Directory;
let generator = Directorate::<Directory>::default();
let readme_file = generator.get_file("README.md");
Dependencies
~1.6–9MB
~62K SLoC