Skip to main content

Event

Enum Event 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

Auto Trait Implementations§

§

impl Forget for Event

§

impl Freeze for Event

§

impl Move for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event
where BoxRaw<Candidate>: Send,

§

impl Sync for Event
where BoxRaw<Candidate>: Sync,

§

impl Unpin for Event

§

impl UnsafeUnpin for Event

§

impl UnwindSafe for Event
where BoxRaw<Candidate>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.