You probably want include_bytes!
.
If you are in older versions of Rust, use include_bin!
instead.
More Related Contents:
- Why is it legal to borrow a temporary?
- Package with both a library and a binary?
- How can I create my own data structure with an iterator that returns mutable references?
- Do mutable references have move semantics?
- What are the options to end a mutable borrow in Rust?
- How do I match enum values with an integer?
- How does Rust provide move semantics?
- How do I convert a Rust closure to a C-style callback?
- How to transform fields during serialization using Serde?
- “borrowed value does not live long enough” when using the builder pattern
- Is it possible to conditionally enable an attribute like `derive`?
- cannot borrow `self.x` as immutable because `*self` is also borrowed as mutable
- Using the same iterator multiple times in Rust
- How do I fix “cannot find derive macro in this scope”?
- Thread ” has overflowed its stack when allocating a large array using Box
- How do you enable a Rust “crate feature”?
- How to implement Iterator yielding mutable references [duplicate]
- How can a Rust program access metadata from its Cargo package?
- How can the ref keyword be avoided when pattern matching in a function taking &self or &mut self?
- How to swap two variables?
- Expected bound lifetime parameter, found concrete lifetime [E0271]
- When is it necessary to circumvent Rust’s borrow checker?
- How to idiomatically alias a crate in Rust 2018?
- Cannot borrow immutable borrowed content as mutable
- Why does the compiler not complain that an iterator moved to a for loop is immutable?
- Removing items from a BTreeMap or BTreeSet found through iteration
- Why doesn’t the lifetime of a mutable borrow end when the function call is complete?
- How to tell what “features” are available per crate?
- How to initialize the logger for integration tests?
- Do I have to implement a trait twice when implementing it for both reference and non-reference types?