Crate ensnare_proc_macros

Source
Expand description

This crate provides proc macros for Ensnare development.

PRO TIP: use cargo expand --lib entities to see what’s being generated

Derive Macros§

Control
The Control macro derives the code that allows automation (one entity’s output driving another entity’s control). Annotate a field with #[control(leaf=true)] if it is neither a primitive nor #[derive(Control)].
InnerConfigurable
Derives code that delegates the implementation of the Configurable trait to an inner struct.
InnerControllable
Derives code that delegates the implementation of the Controllable trait to an inner struct.
InnerControls
Derives the code that delegates the implementation of the Controls trait to an inner struct.
InnerEffect
Derives the code that delegates the implementation of effect traits to an inner struct.
InnerHandlesMidi
Derives the code that delegates the implementation of the HandlesMidi trait to an inner struct.
InnerInstrument
Derives the code that delegates the implementation of instrument traits to an inner struct.
InnerSerializable
Derives code that delegates the implementation of the Serializable trait to an inner struct.
InnerTransformsAudio
Derives code that delegates the implementation of the TransformsAudio trait to an inner struct.
IsEntity
Derives helper methods to access Entity traits.
Metadata
The Metadata macro derives the boilerplate necessary for the HasMetadata trait. If a device needs to interoperate with Orchestrator, then it needs to have a unique ID. Deriving with this macro makes that happen.