Closed nevi-me closed 4 years ago
Thank you for taking the time to open an issue.
I am not sure I fully follow what you are trying to accomplish. Would you mind posting code showing what methods would be useful to have added to the library?
If you want the string representation of a Subject
you can use to_string
. If you want to get the Subject
of a recieved message you can use the subject
method.
I could see it being useful to have a matches
(or something like that) method on Subject
that checks if one Subject
is matched by another Subject
's wildcards. Is that what you are getting at?
My apologies, I hadn't seen that ToString is implemented on Subject. I'm sorted now, happy new year!
I'd like to comment that it would be great to have access to the tokens
that make up the subject. For example when subscribing to a.*.status
rants already has the middle wildcard value populated in the tokens
field. Getting that directly instead of going to_string
seems like a good thing to me.
I noticed that I can't retrieve the name of a
Subject
. If I subscribe to a wildcard/prefix subject such asnotifications.>
, I want to be able to inspect which subject I received (e.g.notifications.emergency.accident
, and react to it accordingly.It looks like the only thing I can do is use
Display
.