pub struct ScopedAddr {
pub ip: IpAddr,
pub ifindex: Option<u32>,
}Expand description
An address an mDNS backend reported, with the interface it was seen on.
Ord sorts by address, then interface, which breaks ties between
candidates of equal preference.
Fields§
§ip: IpAddrThe address.
ifindex: Option<u32>The interface index; required to connect to an IPv6 link-local address.
Implementations§
Source§impl ScopedAddr
impl ScopedAddr
Sourcepub fn is_candidate(&self) -> bool
pub fn is_candidate(&self) -> bool
True when the address can be tried: not loopback or unspecified, and an IPv6 link-local address only with an interface (instance.py:41-56).
Trait Implementations§
Source§impl Clone for ScopedAddr
impl Clone for ScopedAddr
impl Copy for ScopedAddr
Source§impl Debug for ScopedAddr
impl Debug for ScopedAddr
impl Eq for ScopedAddr
Source§impl From<IpAddr> for ScopedAddr
impl From<IpAddr> for ScopedAddr
Source§impl Hash for ScopedAddr
impl Hash for ScopedAddr
Source§impl Ord for ScopedAddr
impl Ord for ScopedAddr
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ScopedAddr
impl PartialEq for ScopedAddr
Source§impl PartialOrd for ScopedAddr
impl PartialOrd for ScopedAddr
impl StructuralPartialEq for ScopedAddr
Auto Trait Implementations§
impl Freeze for ScopedAddr
impl RefUnwindSafe for ScopedAddr
impl Send for ScopedAddr
impl Sync for ScopedAddr
impl Unpin for ScopedAddr
impl UnsafeUnpin for ScopedAddr
impl UnwindSafe for ScopedAddr
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