macro_rules! resource {
($path:literal) => { ... };
}Expand description
Reads a descriptor file at compile time, relative to the crate’s manifest.
ⓘ
registry.add_resource(laterite_admin::resource!("descriptors/posts.yaml"));The file is embedded, so a built binary carries its screens and a missing or malformed one fails the build rather than the deployment. The path is manifest-relative, so it is the same path you would open in an editor, and it appears in any error.
A descriptor that must be read at run time is a different producer of the
same Resource: call from_yaml with whatever you loaded.