item_in!() { /* proc-macro */ }Expand description
Construct an Item reference at compile time.
This variant of the [item!] macro allows the module that’s used to be
specified as the first argument. By default this is rune.
§Examples
use rune_core::item::{Item, ItemBuf};
use rune_macros::item_in;
static ITEM: &Item = rune::item_in!(rune_core::item, ::std::ops::generator::Generator);
let mut item = ItemBuf::with_crate("std")?;
item.push("ops")?;
item.push("generator")?;
item.push("Generator")?;
assert_eq!(item, ITEM);