rust-embed v8.11.0
git clone https://git.pyrossh.dev/rust-embed
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
0558523
— pyros2097
2015-11-29T19:31:09+05:30
Update README.md
README.md
CHANGED
|
@@ -47,10 +47,10 @@ You can directly access your files as constants from the assets module or
|
|
|
47
47
|
you can use this function to serve all files stored in your assets folder which might be useful for webservers.
|
|
48
48
|
|
|
49
49
|
```rust
|
|
50
|
-
|
|
50
|
+
assets:index_html // direct access
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
assets::get(name: str)
|
|
53
|
-
// This will return the data for the specified resource name or will throw an
|
|
53
|
+
// This will return the data for the specified resource name or will throw an error if it cannot be found.
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
## Examples
|