Skip to main content

export

Attribute Macro export 

Source
#[export]
Expand description

Marks that a macro invocation creates one or more pub items. Must be invoked via #[stageleft::export(...)], do not do use.

This ensures that the macro will not be re-invoked in staged code, and instead will use the original items.

#[stageleft::export(MyKey, MyOtherKey)]
slotmap::new_key_type! {
    pub struct MyKey;
    pub struct MyOtherKey;
}