Rabbita commands and subscriptions for typed Proton contracts.
Dependencies
///|
struct PingRequest {
value : String
} derive(ToJson)
///|
struct PingReply {
value : String
} derive(FromJson)
///|
test {
let ping : @proton_contract.Command[PingRequest, PingReply] = @proton_contract.command(
"ping",
)
let request = PingRequest::{ value: "hello" }
let command = invoke(
ping,
request,
reply => {
ignore(reply.value)
@cmd.none
},
_error => @cmd.none,
)
ignore(command)
}Rabbita commands and subscriptions for typed Proton contracts.
Dependencies