macro_rules! channel {
($plugin_id:ident : $msg_ty:ty) => { ... };
}Expand description
Creates a channel plugin for a message type.
The channel! macro creates a plugin that:
- exposes a
ChannelSpecfor the editor and persistence layer - provides a channel factory for reconstruction
- registers itself through the plugin inventory
- makes the message type available in the editor’s Channels section
Example:
#[derive(Debug, Clone, Copy, Default, TypeHash, Message)]
pub struct VehicleState {
pub ready: bool,
pub parked: bool,
pub speed_mps: f32,
}
beetry_plugin::channel! {VehicleStateChannel: VehicleState}