netstack3_base::socket

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§