Skip to content

Commit b8a524f

Browse files
committed
docs
1 parent 3d80b5e commit b8a524f

File tree

7 files changed

+42
-31
lines changed

7 files changed

+42
-31
lines changed

webrtc/src/.DS_Store

6 KB
Binary file not shown.

webrtc/src/ice_transport/ice_gathering_state.rs

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

3-
/// ICEGatheringState describes the state of the candidate gathering process.
3+
/// Describes the state of the ICE candidate gathering process.
44
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
55
pub enum RTCIceGatheringState {
66
#[default]
77
Unspecified,
88

9-
/// ICEGatheringStateNew indicates that any of the ICETransports are
9+
/// Any of the [`RTCIceTransport`]s are
1010
/// in the "new" gathering state and none of the transports are in the
1111
/// "gathering" state, or there are no transports.
12+
///
13+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
1214
New,
1315

14-
/// ICEGatheringStateGathering indicates that any of the ICETransports
16+
/// Any of the [`RTCIceTransport`]s
1517
/// are in the "gathering" state.
18+
///
19+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
1620
Gathering,
1721

18-
/// ICEGatheringStateComplete indicates that at least one ICETransport
19-
/// exists, and all ICETransports are in the "completed" gathering state.
22+
/// At least one [`RTCIceTransport`]
23+
/// exists, and all [`RTCIceTransport`]s are in the "complete" gathering state.
24+
///
25+
/// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
2026
Complete,
2127
}
2228

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
/// AnswerOptions structure describes the options used to control the answer
2-
/// creation process.
1+
/// Describes the options used to control the answer creation process.
32
#[derive(Default, Debug, PartialEq, Eq, Copy, Clone)]
43
pub struct RTCAnswerOptions {
5-
/// voice_activity_detection allows the application to provide information
4+
/// Allows the application to provide information
65
/// about whether it wishes voice detection feature to be enabled or disabled.
76
pub voice_activity_detection: bool,
87
}
98

10-
/// OfferOptions structure describes the options used to control the offer
11-
/// creation process
9+
/// Describes the options used to control the offer creation process
1210
#[derive(Default, Debug, PartialEq, Eq, Copy, Clone)]
1311
pub struct RTCOfferOptions {
14-
/// voice_activity_detection allows the application to provide information
12+
/// Allows the application to provide information
1513
/// about whether it wishes voice detection feature to be enabled or disabled.
1614
pub voice_activity_detection: bool,
1715

18-
/// ice_restart forces the underlying ice gathering process to be restarted.
19-
/// When this value is true, the generated description will have ICE
20-
/// credentials that are different from the current credentials
16+
/// When this value is `true`, the generated description will have ICE
17+
/// credentials that are different from the current credentials. This
18+
/// will result in the ICE connection being restarted when the offer is
19+
/// applied.
20+
///
21+
/// When this value is `false`, the generated description will have the
22+
/// same ICE credentials as the current offer. This is the default.
2123
pub ice_restart: bool,
2224
}

webrtc/src/peer_connection/policy/bundle_policy.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ use std::fmt;
22

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

5-
/// The bundle policy affects which media tracks are negotiated if the remote
6-
/// endpoint is not bundle-aware, and what ICE candidates are gathered. If the
5+
/// The bundle policy
6+
/// ([RFC8829](https://tools.ietf.org/html/rfc8829#section-4.1.1)) affects
7+
/// which media tracks are negotiated if the remote endpoint is not
8+
/// bundle-aware, and what ICE candidates are gathered. If the
79
/// remote endpoint is bundle-aware, all media tracks and data channels are
8-
/// bundled onto the same transport. This is described in
9-
/// [RFC8829](https://tools.ietf.org/html/rfc8829).
10+
/// bundled onto the same transport.
1011
#[derive(Default, Debug, PartialEq, Eq, Copy, Clone, Serialize, Deserialize)]
1112
pub enum RTCBundlePolicy {
1213
#[default]

webrtc/src/peer_connection/policy/ice_transport_policy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::fmt;
33
use serde::{Deserialize, Serialize};
44

55
/// Defines the ICE candidate policy
6-
/// ([RFC8829](https://datatracker.ietf.org/doc/html/rfc8829#section-4.1.1))
7-
/// that will be used to determine the permitted ICE candidates. Permitted
8-
/// candidates will be used for connectivity checks.
6+
/// ([RFC8829](https://tools.ietf.org/html/rfc8829#section-4.1.1))
7+
/// that will be used to determine the permitted ICE candidates. Only the
8+
/// permitted candidates will be used for connectivity checks.
99
#[derive(Default, Debug, PartialEq, Eq, Copy, Clone, Serialize, Deserialize)]
1010
pub enum RTCIceTransportPolicy {
1111
#[default]

webrtc/src/peer_connection/policy/rtcp_mux_policy.rs

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

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

5-
/// RTCPMuxPolicy affects what ICE candidates are gathered to support
6-
/// non-multiplexed RTCP.
5+
/// The mux policy [RFC8829](https://tools.ietf.org/html/rfc8829#section-4.1.1)
6+
/// affects what ICE candidates are gathered to support non-multiplexed RTCP.
77
#[derive(Default, Debug, PartialEq, Eq, Copy, Clone, Serialize, Deserialize)]
88
pub enum RTCRtcpMuxPolicy {
99
#[default]

webrtc/src/peer_connection/signaling_state.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,38 @@ impl fmt::Display for StateChangeOp {
2020
}
2121
}
2222

23-
/// SignalingState indicates the signaling state of the offer/answer process.
23+
/// Indicates the signaling state of the offer/answer process.
2424
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
2525
pub enum RTCSignalingState {
2626
#[default]
2727
Unspecified = 0,
2828

29-
/// SignalingStateStable indicates there is no offer/answer exchange in
29+
/// There is no offer/answer exchange in
3030
/// progress. This is also the initial state, in which case the local and
31-
/// remote descriptions are nil.
31+
/// remote descriptions aren't set.
3232
Stable,
3333

34-
/// SignalingStateHaveLocalOffer indicates that a local description, of
34+
/// A local description, of
3535
/// type "offer", has been successfully applied.
3636
HaveLocalOffer,
3737

38-
/// SignalingStateHaveRemoteOffer indicates that a remote description, of
38+
/// A remote description, of
3939
/// type "offer", has been successfully applied.
4040
HaveRemoteOffer,
4141

42-
/// SignalingStateHaveLocalPranswer indicates that a remote description
42+
/// A remote description
4343
/// of type "offer" has been successfully applied and a local description
4444
/// of type "pranswer" has been successfully applied.
4545
HaveLocalPranswer,
4646

47-
/// SignalingStateHaveRemotePranswer indicates that a local description
47+
/// A local description
4848
/// of type "offer" has been successfully applied and a remote description
4949
/// of type "pranswer" has been successfully applied.
5050
HaveRemotePranswer,
5151

52-
/// SignalingStateClosed indicates The PeerConnection has been closed.
52+
/// The [`RTCPeerConnection`] has been closed.
53+
///
54+
/// [`RTCPeerConnection`]: crate::peer_connection::RTCPeerConnection
5355
Closed,
5456
}
5557

0 commit comments

Comments
 (0)