[][src]Struct xmpp_parsers::jingle_s5b::Candidate

pub struct Candidate {
    pub cid: CandidateId,
    pub host: IpAddr,
    pub jid: Jid,
    pub port: Option<u16>,
    pub priority: u32,
    pub type_: Type,
}

A candidate for a connection.

Fields

cid: CandidateId

The identifier for this candidate.

host: IpAddr

The host to connect to.

jid: Jid

The JID to request at the given end.

port: Option<u16>

The port to connect to.

priority: u32

The priority of this candidate, computed using this formula: priority = (2^16)*(type preference) + (local preference)

type_: Type

The type of the connection being proposed by this candidate.

Methods

impl Candidate[src]

pub fn new(cid: CandidateId, host: IpAddr, jid: Jid, priority: u32) -> Candidate[src]

Creates a new candidate with the given parameters.

pub fn with_port(self, port: u16) -> Candidate[src]

Sets the port of this candidate.

pub fn with_type(self, type_: Type) -> Candidate[src]

Sets the type of this candidate.

Trait Implementations

impl From<Candidate> for Element[src]

impl Clone for Candidate[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Candidate[src]

impl TryFrom<Element> for Candidate[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> IntoElements for T where
    T: Into<Element>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self