Extractor for matching the response of a DMR operation.
Extractor for matching the response of a DMR operation.
val node = ... // a model node returned by some DMR operation node match { case Response(Success, result) => println(s"Successful DMR operation: $result") case Response(Failure, failure) => println(s"DMR operation failed: $failure") case _ => println("Undefined result") }
The pattern matching variables result and failure are both model nodes containing the response payload or the
wrapped error description.
the node to match
the matched patterns
Response constants and extractor for parsing responses to DMR operations