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
14
use rsip_derives::{IntoParam, NewType};

/// Simple NewType around String. Intended to be used for the `q` parameter found in the `Contact`
/// header.
//TODO: add typed + default
#[derive(NewType, IntoParam, Debug, PartialEq, Eq, Clone)]
pub struct Q(String);

#[cfg(feature = "test-utils")]
impl testing_utils::Randomize for Q {
    fn random() -> Self {
        Self(format!("0.{}", testing_utils::rand_num_from(1..=9)))
    }
}