Skip to content

Commit f9518b6

Browse files
committed
docs
1 parent afb4736 commit f9518b6

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

webrtc/src/peer_connection/sdp/sdp_type.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,35 @@ use std::fmt;
22

33
use serde::{Deserialize, Serialize};
44

5-
/// SDPType describes the type of an SessionDescription.
5+
/// Describes the type of an SDP message
66
#[derive(Default, Debug, PartialEq, Eq, Copy, Clone, Serialize, Deserialize)]
7+
#[serde(rename_all = "lowercase")]
78
pub enum RTCSdpType {
89
#[default]
10+
#[serde(rename = "Unspecified")]
911
Unspecified = 0,
1012

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.
1314
Offer,
1415

15-
/// indicates that a description MUST be treated as an
16+
/// Indicates that a description MUST be treated as an
1617
/// SDP answer, but not a final answer. A description used as an SDP
1718
/// pranswer may be applied as a response to an SDP offer, or an update to
1819
/// a previously sent SDP pranswer.
19-
#[serde(rename = "pranswer")]
2020
Pranswer,
2121

22-
/// indicates that a description MUST be treated as an SDP
22+
/// Indicates that a description MUST be treated as an SDP
2323
/// final answer, and the offer-answer exchange MUST be considered complete.
2424
/// 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.
2726
Answer,
2827

29-
/// indicates that a description MUST be treated as
28+
/// Indicates that a description MUST be treated as
3029
/// canceling the current SDP negotiation and moving the SDP offer and
3130
/// answer back to what it was in the previous stable state. Note the
3231
/// 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.
3534
Rollback,
3635
}
3736

0 commit comments

Comments
 (0)