I have the following structure:
Inside queues.rs
I have a #[macro_export]
,
#[macro_export]
macro_rules! queue {...}
but I am not sure how to import it in lib.rs
.
What I have looks like this:
use crate::utils::queues::*;
// use it here
let mut service_queue: Queue<isize> = queue![];
This throws an error
error: cannot find macro `queue` in this scope
--> src/broker.rs:54:51
|
54 | let mut service_queue: Queue<isize> = queue![];
| ^^^^^
|
= note: consider importing this macro:
crate::queue
= help: have you added the `#[macro_use]` on the module/import?
What is the correct way to type #[macro_use]
here, and import my custom macros from utils
?