Valid reports whether s is a known status.
()
| 39 | |
| 40 | // Valid reports whether s is a known status. |
| 41 | func (s Status) Valid() bool { |
| 42 | _, ok := rank[s] |
| 43 | return ok |
| 44 | } |
| 45 | |
| 46 | // Terminal reports whether s is a final state that should never transition |
| 47 | // further. (`sent`/`queued`/`deferred` are non-terminal; the rest are final.) |