pub struct Candidate {
pub addr: SocketAddr,
pub family: Family,
pub source: CandidateSource,
}Expand description
A single family-tagged candidate address for a peer.
Fields§
§addr: SocketAddrThe address to dial.
family: FamilyThe address family (derived from addr; stored so preference is explicit end-to-end).
source: CandidateSourceWhere this address was learned.
Implementations§
Source§impl Candidate
impl Candidate
Sourcepub fn new(addr: SocketAddr, source: CandidateSource) -> Candidate
pub fn new(addr: SocketAddr, source: CandidateSource) -> Candidate
Build a candidate, deriving its family from the address.
Trait Implementations§
impl Copy for Candidate
impl Eq for Candidate
impl StructuralPartialEq for Candidate
Auto Trait Implementations§
impl Freeze for Candidate
impl RefUnwindSafe for Candidate
impl Send for Candidate
impl Sync for Candidate
impl Unpin for Candidate
impl UnsafeUnpin for Candidate
impl UnwindSafe for Candidate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more