macro_rules! link_resource {
    ($resource_name : ident, $filename : expr) => { ... };
}
Expand description

Link an embedded resource, making it available to bracket-lib via the resources system.

Arguments

  • resource_name - a constant that will represent the resource.
  • filename - the path to the file to embed.

The resource must be previously declared with embedded_resource!.

Example

use bracket_embedding::prelude::*;
 
embedded_resource!(SOURCE_FILE, "embedding.rs");
 
fn main() {
   // This helper macro links the above embedding, allowing it to be accessed as a resource from various parts of the program.
   link_resource!(SOURCE_FILE, "embedding.rs");
}