~repos /rust-embed
git clone https://pyrossh.dev/repos/rust-embed.git
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
05585237
—
pyros2097 10 years ago
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
|