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)].
- Inner
Configurable - Derives code that delegates the implementation of the
Configurable
trait to an inner struct. - Inner
Controllable - Derives code that delegates the implementation of the
Controllable
trait to an inner struct. - Inner
Controls - Derives the code that delegates the implementation of the
Controls
trait to an inner struct. - Inner
Effect - Derives the code that delegates the implementation of effect traits to an inner struct.
- Inner
Handles Midi - Derives the code that delegates the implementation of the
HandlesMidi
trait to an inner struct. - Inner
Instrument - Derives the code that delegates the implementation of instrument traits to an inner struct.
- Inner
Serializable - Derives code that delegates the implementation of the
Serializable
trait to an inner struct. - Inner
Transforms Audio - 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 theHasMetadata
trait. If a device needs to interoperate with Orchestrator, then it needs to have a unique ID. Deriving with this macro makes that happen.