Skip to main content

channel

Attribute Macro channel 

Source
#[channel]
Expand description

Marks a struct as a WebSocket channel.

Generates a [doido_cable::ChannelName] impl carrying the channel’s registration name — its struct name (ChatChannel), which ActionCable uses in the identifier to route messages. The struct’s own Channel impl (lifecycle + received) is written by the user and re-emitted untouched.