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

Declare an embedded resource.

Arguments

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

Once embedded, you need to use link_resource to make it available.

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");
}