aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/method.rs
blob: 5f8110a90953bc60ca8ccd0a1a192393591e727f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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",
        })
    }
}