Trait netstack3_base::socket::SocketIpAddrExt

source ·
pub trait SocketIpAddrExt<A: IpAddress>: Witness<A> + ScopeableAddress {
    // Provided methods
    fn must_have_zone(&self) -> bool
       where Self: Copy { ... }
    fn try_into_null_zoned(self) -> Option<AddrAndZone<Self, ()>> { ... }
}
Expand description

Extensions to IP Address witnesses useful in the context of sockets.

Provided Methods§

source

fn must_have_zone(&self) -> bool
where Self: Copy,

Determines whether the provided address is underspecified by itself.

Some addresses are ambiguous and so must have a zone identifier in order to be used in a socket address. This function returns true for IPv6 link-local addresses and false for all others.

source

fn try_into_null_zoned(self) -> Option<AddrAndZone<Self, ()>>

Converts into a [AddrAndZone<A, ()>] if the address requires a zone.

Otherwise returns None.

Object Safety§

This trait is not object safe.

Implementors§