The RoomStatus and ConnectionStatus types introduced in #9 are currently just copied from the JS type. They have a current state property and an optional error property. I believe that error is guaranteed to be non-nil for certain values of current, so it should be possible for us to design an API that doesn't require an unwrap of error in those cases (i.e. make the error an associated value of the state enum). To do this, we first of all need to understand in which states the error is:
The
RoomStatus
andConnectionStatus
types introduced in #9 are currently just copied from the JS type. They have acurrent
state property and an optionalerror
property. I believe thaterror
is guaranteed to be non-nil for certain values ofcurrent
, so it should be possible for us to design an API that doesn't require an unwrap oferror
in those cases (i.e. make the error an associated value of the state enum). To do this, we first of all need to understand in which states the error is:(Ditto for the corresponding
*StateChange
types.)┆Issue is synchronized with this Jira Task by Unito