Open zeenix opened 3 years ago
In GitLab by @danieldg on Sep 29, 2021, 02:39
The second part was mostly done by !391 - though we could perhaps improve that by making those method not return Result
as they are not supposed to fail give a valid Message
(and all Message
objects should be valid).
This would allow making
MessageFields
private and have all access to headers be via method on Message that returnOption
s instead ofResult<Option<HeaderValue>>
Not sure this is a good idea. How would header
attribute of dbus_interface
methods work then? You'd need individual attributes for each field passed separately then. OTOH if we keep MessageFields
around, I'm wondering why the message header/fields API can't be modified to always keep the headers in the decoded form (rather than Message doing that)?
In GitLab by @danieldg on Sep 29, 2021, 17:52
You could swap that out for a message
attribute instead. Or make a wrapper around Message
(distinct from MessageFields) that only allows access to the header, but I don't see a need for that.
I think I'm going to postpone this for zbus 3.0 because:
In GitLab by @danieldg on Aug 29, 2021, 03:25
Ideas for future work:
MessageFields
private and have all access to headers be via method on Message that returnOption
s instead ofResult<Option<HeaderValue>>
. Might get some minor speedups from having the values pre-parsed.See !364