Guarantees
Mistakes that do not compile, and the error the compiler prints for each.
The diagram as text
- a reply type without #[derive(Outgoing)] → `Receipt` does not declare where it is published
- a naming transform on a reply that names its destination → `Receipt` does not let a transform name the destination
- a mounting with no codec feature enabled → no codec is available to decode this subscriber's input
- Out<impl RequestReply> on a publisher without it → `MemoryPublisher` does not support request / reply messaging
- workers(4) and threads(2) on one subscriber → workers(..) and threads(..) fill the same position: name one of them
- a publish with no destination → this publish has no destination yet
- a publish without the headers its message declares → the headers of this publish do not match the message's contract
- You write
- The compiler answers
A mistake the compiler can see is a compile error, not a check at startup or on each message. A check per message would cost every delivery, and a check at startup finds the mistake only where the service first runs. Each error names the type or the step at fault.
Each row is a reply, transform, codec, publisher capability, dispatch, publish and typed header rule, in that order. A setting fixed once on a mount chain cannot be fixed again, and a capability the broker lacks is a missing method or an unmet bound.
The lifecycle is typed too: a broker that is not connected has no method to subscribe or publish with, and a closed one has been consumed.