Expand description
Procedural macros for RustStream.
Re-exported from the ruststream crate under the macros feature; depend on that rather than
on this crate directly.
Attribute Macros§
- app
- Generates a
mainentry point for aRustStreamservice. - subscriber
- Turns an
async fnhandler into a mountable subscriber definition.
Derive Macros§
- Deserialized
- Derives a self-deserializing input type (
Deserializedin the core crate):Deserializemeans the framework’s codec does it,Deserializedmeans it is already done by the user’s own type. - FromRef
- Derives
FromReffor each field of an application-state struct, so#[subscriber]handlers can inject any field withState<FieldType>without a hand-written impl. - Message
Info - Derives
MessageInfometadata: the type name, its doc comment, and its header contract. - OutMessages
- Derives a declared message set (
OutMessagesin the core crate) from an enum whose variants each wrap one message model. The enum is a type-level declaration: it is never constructed, its variants’ inner types are the set. - OutSlot
- Derives
OutSlotfor a unit struct, making it a slot marker forOut<impl Publisher, Marker>handler parameters. The marker’sNAMEis the struct’s identifier, used by startup errors and test assertions. - Outgoing
- Derives everything a message type declares about being sent, from one
key = valueattribute: its destination (OutgoingDestination), its optional typed header contract, and theMessageInfometadata the generated document reads (the type’s name and doc comment). - Serialized
- Derives a self-serialized outgoing type (
Serializedin the core crate):Serializemeans the framework’s codec does it,Serializedmeans it is already done by the user’s own type.