Simplify UniverseRef and Universe users in GuardMgr?
At !832 (comment 2851913), @Diziet notes:
ISTM that
Universe
could be made dyn-compatible.fn contains(&self, guard: &&dyn ChanTarget) -> Option<bool>; fn weight_threshold(&self, sample: Box<dyn Iterator<Item=<&(dyn HasRelayIds + '_)>>>, params: &GuardParams) -> WeightThreshold;
etc. I'm not sure if it would be a good idea, but it would save a lot of pretty pointless typing.
Also, if we keep this enum, I'm kind of tempted to suggest the use of
ambassador
(which I have used with success in a personal project) orenum_delegate
or something.
I'm okay with exploring both of these options. Since this is a crate-internal structure and trait, however, it's okay to do it later.