Skip to content

Commit 317abb8

Browse files
committed
docs
1 parent b8185c7 commit 317abb8

File tree

1 file changed

+45
-28
lines changed

1 file changed

+45
-28
lines changed

webrtc/src/ice_transport/ice_connection_state.rs

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,61 @@
11
use std::fmt;
22

3-
/// RTCIceConnectionState indicates signaling state of the ICE Connection.
3+
/// Indicates the signaling state of the ICE Connection.
44
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
55
pub enum RTCIceConnectionState {
66
#[default]
77
Unspecified,
88

9-
/// ICEConnectionStateNew indicates that any of the ICETransports are
10-
/// in the "new" state and none of them are in the "checking", "disconnected"
11-
/// or "failed" state, or all ICETransports are in the "closed" state, or
12-
/// there are no transports.
13-
New,
9+
/// Indicates that the [`RTCPeerConnection`] is closed
10+
///
11+
/// [`RTCPeerConnection`]: crate::peer_connection::RTCPeerConnection
12+
Closed,
1413

15-
/// ICEConnectionStateChecking indicates that any of the ICETransports
16-
/// are in the "checking" state and none of them are in the "disconnected"
17-
/// or "failed" state.
18-
Checking,
14+
/// Indicates all of the following:
15+
/// - the previous state does not apply
16+
/// - any of the [`RTCIceTransport`]s are in the `failed` state
17+
///
18+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
19+
Failed,
1920

20-
/// ICEConnectionStateConnected indicates that all ICETransports are
21-
/// in the "connected", "completed" or "closed" state and at least one of
22-
/// them is in the "connected" state.
23-
Connected,
21+
/// Indicates all of the following:
22+
/// - none of the previous states apply
23+
/// - any of the [`RTCIceTransport`]s are in the `disconnected` state
24+
///
25+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
26+
Disconnected,
2427

25-
/// ICEConnectionStateCompleted indicates that all ICETransports are
26-
/// in the "completed" or "closed" state and at least one of them is in the
27-
/// "completed" state.
28-
Completed,
28+
/// Indicates all of the following:
29+
/// - none of the previous states apply
30+
/// - all of the [`RTCIceTransport`]s are in the `new` or
31+
/// `closed` state, or
32+
/// - there are no transports
33+
///
34+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
35+
New,
2936

30-
/// ICEConnectionStateDisconnected indicates that any of the
31-
/// ICETransports are in the "disconnected" state and none of them are
32-
/// in the "failed" state.
33-
Disconnected,
37+
/// Indicates all of the following:
38+
/// - none of the previous states apply
39+
/// - any of the [`RTCIceTransport`]s are in the `new` or `checking` state
40+
///
41+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
42+
Checking,
3443

35-
/// ICEConnectionStateFailed indicates that any of the ICETransports
36-
/// are in the "failed" state.
37-
Failed,
44+
/// Indicates all of the following:
45+
/// - none of the previous states apply
46+
/// - all of the [`RTCIceTransport`]s are in the `completed` or
47+
/// `closed` state
48+
///
49+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
50+
Completed,
3851

39-
/// ICEConnectionStateClosed indicates that the PeerConnection's
40-
/// isClosed is true.
41-
Closed,
52+
/// Indicates all of the following:
53+
/// - none of the previous states apply
54+
/// - all of the [`RTCIceTransport`]s are in the `connected`, `completed`, or
55+
/// `closed` state
56+
///
57+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
58+
Connected,
4259
}
4360

4461
const ICE_CONNECTION_STATE_NEW_STR: &str = "new";

0 commit comments

Comments
 (0)