#[non_exhaustive]pub enum Event {
ConnectionStateChange(ConnectionState),
SelectedCandidatePairChange(Box<Candidate>, Box<Candidate>),
RoleChange(bool),
LocalCandidateRenamed(Box<Candidate>),
LiteCandidateUpdate(Box<Candidate>, Box<Candidate>),
CandidatePairAdded(Box<Candidate>, Box<Candidate>),
CandidatePairRemoved(Box<Candidate>, Box<Candidate>),
CandidatePairNominationProposed(Box<Candidate>, Box<Candidate>),
IntegrityViolation(Box<Candidate>, Box<Candidate>),
}Expand description
What the agent reports to its caller.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConnectionStateChange(ConnectionState)
The agent’s connection state changed.
SelectedCandidatePairChange(Box<Candidate>, Box<Candidate>)
A new pair was selected, carrying the local and remote candidates.
Media should be sent on this pair from now on.
RoleChange(bool)
Emitted when the ICE role switches due to a role conflict (RFC 8445 §7.3.1.1).
The bool is true if the agent is now controlling, false if now controlled.
LocalCandidateRenamed(Box<Candidate>)
A local candidate is signalled differently from now on and has to be conveyed to the peer again: its mDNS name was lost to another host (RFC 6762 Section 9) and it has a new one. The candidate keeps its id.
LiteCandidateUpdate(Box<Candidate>, Box<Candidate>)
Two lite agents, this one controlling, and more than one candidate pair: the agent chose this pair (local, remote), and RFC 8445 Section 8.2 has the controlling agent “send an updated candidate list to reconcile different agents selecting different candidate pairs”: an updated candidate exchange with these two candidates only.
CandidatePairAdded(Box<Candidate>, Box<Candidate>)
A candidate pair (local, remote) was put on the agent’s list of pairs: formed from a
local and a remote candidate, from a peer’s request, or as the valid pair a response
produced (webrtc-extensions 7, icecandidatepairadd).
CandidatePairRemoved(Box<Candidate>, Box<Candidate>)
A candidate pair (local, remote) left the agent’s list: another pair took its place
on a full checklist, an ICE restart dropped the pairs, or the application removed it
with Agent::remove_candidate_pair (webrtc-extensions 7, icecandidatepairremove).
CandidatePairNominationProposed(Box<Candidate>, Box<Candidate>)
With AgentConfig::candidate_pair_proposals: the controlling agent picked this pair
(local, remote) to nominate and waits for Agent::resolve_nomination_proposal
(webrtc-extensions 7, icecandidatepairnominate).
IntegrityViolation(Box<Candidate>, Box<Candidate>)
A check (or consent request) on this pair (local, remote) ended without a response that passed its integrity check, and at least one response arrived that failed it: RFC 8489 Section 9.1.4 has the transaction signal “an integrity protection violation” instead of a timeout. The pair fails as it would on a timeout; the event says why.