This PR instructs serde to rename sample_frequency into sample_freq during de/serialization.
It also introduces a module for converting the u8 into a String.
Finally, this PR adds a test in nats/tests/jetstream.rs that can be executed via cargo test -- jetstream_consumer_configs_sample_frequency, which checks that the stored config of the consumer now contains the correctly set field.
Removing the rename = sample_freq directive from the ConsumerConfig type causes this test to fail, so all seems to be correct.
Addendum to #1300 for the
nats
module.This PR instructs serde to rename
sample_frequency
intosample_freq
during de/serialization. It also introduces a module for converting theu8
into aString
.Finally, this PR adds a test in
nats/tests/jetstream.rs
that can be executed viacargo test -- jetstream_consumer_configs_sample_frequency
, which checks that the stored config of the consumer now contains the correctly set field. Removing therename = sample_freq
directive from theConsumerConfig
type causes this test to fail, so all seems to be correct.