Closed fpagliughi closed 1 year ago
Missing methods: remove/get_mut
/matches_mut
.
@gaoqiangz , yes! The initial version was definitely a hack. I'm not a CS, so I'm trying to figure out a better way to implement this in Rust. I should have something better with a mutable iterator, and all that, by the next release.
OK. I refactored the implementation, particularly that of the Node and iterator, which allowed me to implement a matching mutable iterator. So the requested functions are in place, but note that remove()
currently only removes the value at the requested node; it doesn't remove any nodes from the branch that may no longer be needed.
I'm happy to take a PR if anyone wants to give that a try.
It's currently in the develop
branch.
The initial implementation of the
TopicMatcher
class which was introduced in v0.10.0 does a pretty poor job for it's primary purpose: to help match incoming messages to callbacks based on the topic of each message.In particular:
Default
which is not possible for aFn
definition.