We saw ticket #297 and had already did some related work in our local repo.
Our scope was a bit different: We needed to make the QosPolicyBuilder ser/deserializable, to be able to load it from configuration files, then append/modify QoS Policies before building the QosPolicies struct. It was not a big deal to increase the scope to QosPolicies stuct.
Thus, I suggest this pull-request to resolve ticket #297.
I did not find any contributing guidelines, don't hesitate to tell me if the format doesn't suit you.
Regards,
Thomas
Modification description
Added Serialize and Deserialize derives to all QoS policies, and to the QosPolicies + QosPolicyBuilder structs.
Added missing derives to the QosPolicyBuilder for ease of use (Added derives are Clone, Debug, PartialEq, Eq). Its derives now match the QosPolicies ones.
Test Performed
Built RustDDS with and without security feature
Ran tests using cargo test -- --test-threads=1, no tests are failing
Build our internal project using this RustDDS version. I was able to deserialize a QoSPolicyBuilder from a file using serde-json crate.
What was not tested
Serialization / Deserialization of a QosPolicies (I let @samcarey test in his use case)
Serialization / Deserialization when the security feature is enabled (We don't use it in our project, so I was just able to compile RustDDS alone.)
Functional impact
One can now Serialize and Deserialize QosPolicies and QosPolicyBuilder using serde.
Hello,
We saw ticket #297 and had already did some related work in our local repo.
Our scope was a bit different: We needed to make the
QosPolicyBuilder
ser/deserializable, to be able to load it from configuration files, then append/modify QoS Policies before building theQosPolicies
struct. It was not a big deal to increase the scope toQosPolicies
stuct.Thus, I suggest this pull-request to resolve ticket #297.
Regards,
Thomas
Modification description
Serialize
andDeserialize
derives to all QoS policies, and to theQosPolicies
+QosPolicyBuilder
structs.QosPolicyBuilder
for ease of use (Added derives areClone
,Debug
,PartialEq
,Eq
). Its derives now match theQosPolicies
ones.Test Performed
security
featurecargo test -- --test-threads=1
, no tests are failingQoSPolicyBuilder
from a file usingserde-json
crate.What was not tested
QosPolicies
(I let @samcarey test in his use case)security
feature is enabled (We don't use it in our project, so I was just able to compile RustDDS alone.)Functional impact
One can now Serialize and Deserialize
QosPolicies
andQosPolicyBuilder
usingserde
.