docs.rs failed to build pocket-resources-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
pocket-resources-0.3.2
Pocket-resources
Usage
See the demo crate.
Tweak your Cargo.toml to use a build script:
[]
# ...
= "build.rs"
[]
= "*"
Create a build.rs
file:
extern crate pocket_resources;
Include the resources where you want:
include!;
This creates a public enum named Resource
. If you want to name it something else, or if you want it private, you should use a module.
You can then load the resource directly from the enum:
let data: & = PathToImagePng.load;
Or load it at runtime:
let data: & = from_name.unwrap.load;