ezk_sdp_types/attributes/setup.rs
1use std::fmt;
2
3#[derive(Debug, Clone, Copy)]
4pub enum Setup {
5 Active,
6 Passive,
7 ActPass,
8 HoldConn,
9}
10
11impl Setup {
12 fn as_str(&self) -> &'static str {
13 match self {
14 Setup::Active => "active",
15 Setup::Passive => "passive",
16 Setup::ActPass => "actpass",
17 Setup::HoldConn => "holdconn",
18 }
19 }
20}
21
22impl fmt::Display for Setup {
23 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
24 f.write_str(self.as_str())
25 }
26}