Normally "make bad states unrepresentable" is super helpful advice.
I keep trying to use itertools::EitherOrBoth in my APIs but I go back to (Option<T>, Option<T>) every time. I just end up with too much duplication in between the Left, Right and Both cases.
Remarkable research exploring the design of a distributed VPN using zero knowledge proofs to allow nodes to choose permitted traffic whilst preserving privacy: