aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/method.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/method.rs')
-rw-r--r--src/encoding/method.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/encoding/method.rs b/src/encoding/method.rs
new file mode 100644
index 0000000..5f8110a
--- /dev/null
+++ b/src/encoding/method.rs
@@ -0,0 +1,23 @@
+use std::fmt::Display;
+
+pub enum Method {
+ Register,
+ Invite,
+ Ack,
+ Option,
+ Cancel,
+ Bye,
+}
+
+impl Display for Method {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.write_str(match self {
+ Method::Register => "REGISTER",
+ Method::Invite => "INVITE",
+ Method::Ack => "ACK",
+ Method::Option => "OPTION",
+ Method::Cancel => "CANCEL",
+ Method::Bye => "BYE",
+ })
+ }
+}