Make XandTransaction exhaustive

After some discussion it makes more sense to keep XandTransaction exhaustive for reasons of:

  • leveraging the type checker
  • using the power of Rust enums to force us to handle all possible variants explicitly
  • providing more accurate error messages when passing through a serialization boundary: in the case of version mismatch between an xand-api-client and the xand-api server, deserializing/converting to the enum would fail if the variant does not exist, so a seemingly spurious proto error would happen before caller code is run and has a chance to provide a more salient error),

Contributes to closing 7055

Merge request reports

Loading