rsip/common/uri/param/
maddr.rs

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