@@ -2,36 +2,35 @@ use std::fmt;
2
2
3
3
use serde:: { Deserialize , Serialize } ;
4
4
5
- /// SDPType describes the type of an SessionDescription.
5
+ /// Describes the type of an SDP message
6
6
#[ derive( Default , Debug , PartialEq , Eq , Copy , Clone , Serialize , Deserialize ) ]
7
+ #[ serde( rename_all = "lowercase" ) ]
7
8
pub enum RTCSdpType {
8
9
#[ default]
10
+ #[ serde( rename = "Unspecified" ) ]
9
11
Unspecified = 0 ,
10
12
11
- /// indicates that a description MUST be treated as an SDP offer.
12
- #[ serde( rename = "offer" ) ]
13
+ /// Indicates that a description MUST be treated as an SDP offer.
13
14
Offer ,
14
15
15
- /// indicates that a description MUST be treated as an
16
+ /// Indicates that a description MUST be treated as an
16
17
/// SDP answer, but not a final answer. A description used as an SDP
17
18
/// pranswer may be applied as a response to an SDP offer, or an update to
18
19
/// a previously sent SDP pranswer.
19
- #[ serde( rename = "pranswer" ) ]
20
20
Pranswer ,
21
21
22
- /// indicates that a description MUST be treated as an SDP
22
+ /// Indicates that a description MUST be treated as an SDP
23
23
/// final answer, and the offer-answer exchange MUST be considered complete.
24
24
/// A description used as an SDP answer may be applied as a response to an
25
- /// SDP offer or as an update to a previously sent SDP pranswer.
26
- #[ serde( rename = "answer" ) ]
25
+ /// SDP offer or as an update to a previously sent SDP pranswer.
27
26
Answer ,
28
27
29
- /// indicates that a description MUST be treated as
28
+ /// Indicates that a description MUST be treated as
30
29
/// canceling the current SDP negotiation and moving the SDP offer and
31
30
/// answer back to what it was in the previous stable state. Note the
32
31
/// local or remote SDP descriptions in the previous stable state could be
33
- /// null if there has not yet been a successful offer-answer negotiation.
34
- # [ serde ( rename = "rollback" ) ]
32
+ /// `None` if there has not yet been a successful offer-answer negotiation.
33
+ /// An answer or pranswer cannot be rolled back.
35
34
Rollback ,
36
35
}
37
36
0 commit comments