ftth_rsip/common/uri/param/q.rs
1use rsip_derives::{IntoParam, NewType};
2
3/// Simple NewType around String. Intended to be used for the `q` parameter found in the `Contact`
4/// header.
5//TODO: add typed + default
6#[derive(NewType, IntoParam, Debug, PartialEq, Eq, Clone)]
7pub struct Q(String);
8
9#[cfg(feature = "test-utils")]
10impl testing_utils::Randomize for Q {
11 fn random() -> Self {
12 Self(format!("0.{}", testing_utils::rand_num_from(1..=9)))
13 }
14}