rsip/common/uri/param/
ttl.rs

1use rsip_derives::{IntoParam, NewType};
2
3/// Simple NewType around String. Intended to be used for the `ttl` parameter found in the
4/// SIP(S) uris and in `Via` header.
5#[derive(NewType, IntoParam, Debug, PartialEq, Eq, Clone)]
6pub struct Ttl(String);
7
8#[cfg(feature = "test-utils")]
9impl testing_utils::Randomize for Ttl {
10    fn random() -> Self {
11        Self(testing_utils::rand_num_from(1..=100).to_string())
12    }
13}