Skip to main content

JigDef

Trait JigDef 

Source
pub trait JigDef {
    const META: JigMeta;

    // Required method
    fn collect(out: &mut Vec<&'static JigMeta>);
}
Expand description

Trait implemented by the zero-sized marker struct that the #[jig] macro emits alongside each jig function. The marker struct is named __Jig_<fn_name> to avoid namespace collisions with the function itself. The jigs! macro calls <Entry as JigDef>::collect to recursively gather metadata for every reachable jig, with no link-time registration.

Required Associated Constants§

Source

const META: JigMeta

Static metadata for this jig.

Required Methods§

Source

fn collect(out: &mut Vec<&'static JigMeta>)

Append this jig’s metadata to out and recursively collect every jig reachable through Self::META’s chain, deduplicating by name.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§