Skip to content

Commit e24753b

Browse files
committed
docs
1 parent 833b057 commit e24753b

File tree

3 files changed

+55
-33
lines changed

3 files changed

+55
-33
lines changed

webrtc/src/ice_transport/ice_gathering_state.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ pub enum RTCIceGatheringState {
77
Unspecified,
88

99
/// Any of the [`RTCIceTransport`]s are
10-
/// in the "new" gathering state and none of the transports are in the
11-
/// "gathering" state, or there are no transports.
10+
/// in the `new` gathering state and none of the transports are in the
11+
/// `gathering` state, or there are no transports.
1212
///
1313
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
1414
New,
1515

1616
/// Any of the [`RTCIceTransport`]s
17-
/// are in the "gathering" state.
17+
/// are in the `gathering` state.
1818
///
1919
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
2020
Gathering,
2121

2222
/// At least one [`RTCIceTransport`]
23-
/// exists, and all [`RTCIceTransport`]s are in the "complete" gathering state.
23+
/// exists, and all [`RTCIceTransport`]s are in the `complete` gathering state.
2424
///
2525
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
2626
Complete,

webrtc/src/peer_connection/peer_connection_state.rs

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,56 @@ pub enum RTCPeerConnectionState {
88
#[default]
99
Unspecified,
1010

11-
/// PeerConnectionStateNew indicates that any of the ICETransports or
12-
/// DTLSTransports are in the "new" state and none of the transports are
13-
/// in the "connecting", "checking", "failed" or "disconnected" state, or
14-
/// all transports are in the "closed" state, or there are no transports.
15-
New,
16-
17-
/// PeerConnectionStateConnecting indicates that any of the
18-
/// ICETransports or DTLSTransports are in the "connecting" or
19-
/// "checking" state and none of them is in the "failed" state.
20-
Connecting,
11+
/// Indicates that the [`RTCPeerConnection`] is closed
12+
///
13+
/// [`RTCPeerConnection`]: crate::peer_connection::RTCPeerConnection
14+
Closed,
2115

22-
/// PeerConnectionStateConnected indicates that all ICETransports and
23-
/// DTLSTransports are in the "connected", "completed" or "closed" state
24-
/// and at least one of them is in the "connected" or "completed" state.
25-
Connected,
16+
/// Indicates all of the following:
17+
/// - the previous state does not apply
18+
/// - any of the [`RTCIceTransport`]s or [`RTCDtlsTransport`]s
19+
/// are in a `failed` state
20+
///
21+
/// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
22+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
23+
Failed,
2624

27-
/// PeerConnectionStateDisconnected indicates that any of the
28-
/// ICETransports or DTLSTransports are in the "disconnected" state
29-
/// and none of them are in the "failed" or "connecting" or "checking" state.
25+
/// Indicates all of the following:
26+
/// - none of the previous states apply
27+
/// - any of the [`RTCIceTransport`]s are in the `disconnected` state
28+
///
29+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
3030
Disconnected,
3131

32-
/// PeerConnectionStateFailed indicates that any of the ICETransports
33-
/// or DTLSTransports are in a "failed" state.
34-
Failed,
32+
/// Indicates all of the following:
33+
/// - none of the previous states apply
34+
/// - all of the [`RTCIceTransport`]s are in the `new` or `closed` state
35+
/// - all of the [`RTCDtlsTransport`]s (if any) are in the `new` or
36+
/// `closed` state
37+
///
38+
/// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
39+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
40+
New,
3541

36-
/// PeerConnectionStateClosed indicates the peer connection is closed
37-
/// and the isClosed member variable of PeerConnection is true.
38-
Closed,
42+
/// Indicates all of the following:
43+
/// - none of the previous states apply
44+
/// - any of the [`RTCIceTransport`]s are in the `new` or `checking` state, or
45+
/// - any of the [`RTCDtlsTransport`]s are in the `new` or `connecting` state
46+
///
47+
/// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
48+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
49+
Connecting,
50+
51+
/// Indicates all of the following:
52+
/// - none of the previous states apply
53+
/// - all of the [`RTCIceTransport`]s are in the `connected`, `completed`, or
54+
/// `closed` state
55+
/// - all of the [`RTCDtlsTransport`]s (if any) are in the `connected` or
56+
/// `closed` state
57+
///
58+
/// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
59+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
60+
Connected,
3961
}
4062

4163
const PEER_CONNECTION_STATE_NEW_STR: &str = "new";

webrtc/src/peer_connection/signaling_state.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ pub enum RTCSignalingState {
3232
Stable,
3333

3434
/// A local description, of
35-
/// type "offer", has been successfully applied.
35+
/// type `offer`, has been successfully applied.
3636
HaveLocalOffer,
3737

3838
/// A remote description, of
39-
/// type "offer", has been successfully applied.
39+
/// type `offer`, has been successfully applied.
4040
HaveRemoteOffer,
4141

4242
/// A remote description
43-
/// of type "offer" has been successfully applied and a local description
44-
/// of type "pranswer" has been successfully applied.
43+
/// of type `offer` has been successfully applied and a local description
44+
/// of type `pranswer` has been successfully applied.
4545
HaveLocalPranswer,
4646

4747
/// A local description
48-
/// of type "offer" has been successfully applied and a remote description
49-
/// of type "pranswer" has been successfully applied.
48+
/// of type `offer` has been successfully applied and a remote description
49+
/// of type `pranswer` has been successfully applied.
5050
HaveRemotePranswer,
5151

5252
/// The [`RTCPeerConnection`] has been closed.

0 commit comments

Comments
 (0)