1#[derive(Debug, Clone)]
5pub struct StreamConfig(Box<StreamConfigInner>);
6
7impl StreamConfig {
8 #[must_use]
9 pub fn new(room_id: u64, uid: u64, token: String, servers: Vec<String>) -> Self {
10 Self(Box::new(StreamConfigInner {
11 room_id,
12 uid,
13 token,
14 servers,
15 }))
16 }
17}
18
19impl StreamConfig {
20 #[must_use]
22 pub const fn room_id(&self) -> u64 {
23 self.0.room_id
24 }
25 #[must_use]
27 pub const fn uid(&self) -> u64 {
28 self.0.uid
29 }
30 #[must_use]
32 pub fn token(&self) -> &str {
33 &self.0.token
34 }
35 #[must_use]
37 pub fn servers(&self) -> &[String] {
38 &self.0.servers
39 }
40}
41
42#[derive(Debug, Clone)]
43struct StreamConfigInner {
44 room_id: u64,
46 uid: u64,
48 token: String,
50 servers: Vec<String>,
51}