rsip 0.4.0

SIP Rust library, parser & generator of SIP
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use rsip_derives::{IntoParam, NewType};

/// Simple NewType around String. Intended to be used for the `maddr` parameter found in the
/// `Via` header.
#[derive(NewType, IntoParam, Debug, PartialEq, Eq, Clone)]
pub struct Maddr(String);

#[cfg(feature = "test-utils")]
impl testing_utils::Randomize for Maddr {
    fn random() -> Self {
        Self(std::net::IpAddr::random().to_string())
    }
}