pub trait UdpConnect {
type Error: Error;
type Socket<'a>: UdpReceive<Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error> + UdpSend + UdpSplitMulticast + MulticastV4 + MulticastV6 + Readable
where Self: 'a;
// Required method
async fn connect(
&self,
local: SocketAddr,
remote: SocketAddr,
) -> Result<Self::Socket<'_>, Self::Error>;
}Expand description
Re-export the edge-nal crate
This is a factory trait for creating connected UDP sockets
Required Associated Types§
Sourcetype Socket<'a>: UdpReceive<Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error> + UdpSend + UdpSplitMulticast + MulticastV4 + MulticastV6 + Readable
where
Self: 'a
type Socket<'a>: UdpReceive<Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error, Error = Self::Error> + UdpSend + UdpSplitMulticast + MulticastV4 + MulticastV6 + Readable where Self: 'a
The socket type returned by the factory
Required Methods§
Sourceasync fn connect(
&self,
local: SocketAddr,
remote: SocketAddr,
) -> Result<Self::Socket<'_>, Self::Error>
async fn connect( &self, local: SocketAddr, remote: SocketAddr, ) -> Result<Self::Socket<'_>, Self::Error>
Connect to a remote socket
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".