sip_codec/
request.rs

1use std::net::IpAddr;
2
3use http::header::HeaderMap;
4
5use crate::Version;
6
7#[derive(Clone, Eq, PartialEq, Debug, Hash)]
8pub enum Host {
9	IpAddr(IpAddr),
10	Hostname(String),
11}
12
13#[derive(Debug, Clone, PartialEq, Eq, Hash)]
14pub struct URI {
15	pub user: Option<String>,
16	pub password: Option<String>,
17	pub host: Host,
18	pub port: Option<u16>,
19}
20
21#[derive(Eq, PartialEq, Clone, Debug)]
22pub struct Request {
23	pub method: String,
24	pub uri: String,
25	pub sip_version: Version,
26	pub headers: HeaderMap,
27	pub body: Vec<u8>,
28}