pub trait SocketZonedAddrExt<W, A, D> {
// Required method
fn resolve_addr_with_device(
self,
device: Option<D::Weak>,
) -> Result<(W, Option<EitherDeviceId<D, D::Weak>>), ZonedAddressError>
where D: StrongDeviceIdentifier;
}
Expand description
An extention trait for ZonedAddr
.
Required Methods§
Sourcefn resolve_addr_with_device(
self,
device: Option<D::Weak>,
) -> Result<(W, Option<EitherDeviceId<D, D::Weak>>), ZonedAddressError>where
D: StrongDeviceIdentifier,
fn resolve_addr_with_device(
self,
device: Option<D::Weak>,
) -> Result<(W, Option<EitherDeviceId<D, D::Weak>>), ZonedAddressError>where
D: StrongDeviceIdentifier,
Returns the address and device that should be used for a socket.
Given an address for a socket and an optional device that the socket is
already bound on, returns the address and device that should be used
for the socket. If addr
and device
require inconsistent devices,
or if addr
requires a zone but there is none specified (by addr
or
device
), an error is returned.