Skip to main content

Crate ruststream_macros

Crate ruststream_macros 

Source
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 main entry point for a RustStream service.
subscriber
Turns an async fn handler into a mountable subscriber definition.

Derive Macros§

Deserialized
Derives a self-deserializing input type (Deserialized in the core crate): Deserialize means the framework’s codec does it, Deserialized means it is already done by the user’s own type.
FromRef
Derives FromRef for each field of an application-state struct, so #[subscriber] handlers can inject any field with State<FieldType> without a hand-written impl.
MessageInfo
Derives MessageInfo metadata: the type name, its doc comment, and its header contract.
OutMessages
Derives a declared message set (OutMessages in 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 OutSlot for a unit struct, making it a slot marker for Out<impl Publisher, Marker> handler parameters. The marker’s NAME is the struct’s identifier, used by startup errors and test assertions.
Outgoing
Derives everything a message type declares about being sent, from one key = value attribute: its destination (OutgoingDestination), its optional typed header contract, and the MessageInfo metadata the generated document reads (the type’s name and doc comment).
Serialized
Derives a self-serialized outgoing type (Serialized in the core crate): Serialize means the framework’s codec does it, Serialized means it is already done by the user’s own type.