pub struct CandidateStats {
    pub timestamp: Instant,
    pub id: String,
    pub network_type: NetworkType,
    pub ip: String,
    pub port: u16,
    pub candidate_type: CandidateType,
    pub priority: u32,
    pub url: String,
    pub relay_protocol: String,
    pub deleted: bool,
}
Expand description

Contains ICE candidate statistics related to the ICETransport objects.

Fields

timestamp: Instantid: String

The candidate id.

network_type: NetworkType

The type of network interface used by the base of a local candidate (the address the ICE agent sends from). Only present for local candidates; it’s not possible to know what type of network interface a remote candidate is using.

Note: This stat only tells you about the network interface used by the first “hop”; it’s possible that a connection will be bottlenecked by another type of network. For example, when using Wi-Fi tethering, the networkType of the relevant candidate would be “wifi”, even when the next hop is over a cellular connection.

ip: String

The IP address of the candidate, allowing for IPv4 addresses and IPv6 addresses, but fully qualified domain names (FQDNs) are not allowed.

port: u16

The port number of the candidate.

candidate_type: CandidateType

The Type field of the ICECandidate.

priority: u32

The priority field of the ICECandidate.

url: String

The url of the TURN or STUN server indicated in the that translated this IP address. It is the url address surfaced in an PeerConnectionICEEvent.

relay_protocol: String

The protocol used by the endpoint to communicate with the TURN server. This is only present for local candidates. Valid values for the TURN url protocol is one of udp, tcp, or tls.

deleted: bool

It is true if the candidate has been deleted/freed. For host candidates, this means that any network resources (typically a socket) associated with the candidate have been released. For TURN candidates, this means the TURN allocation is no longer active.

Only defined for local candidates. For remote candidates, this property is not applicable.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.