1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
pub mod endpoint; #[cfg(feature = "inproc")] pub mod inproc; #[cfg(feature = "ipc")] pub mod ipc; pub mod tcp; use std::os::fd::AsRawFd; use tokio::io::{AsyncRead, AsyncWrite}; /// Trait alias for streams usable by ZMTP connection actors. pub(crate) trait ZmtpStdStream: AsyncRead + AsyncWrite + AsRawFd + Unpin + Send + std::fmt::Debug + 'static {} // Implement the marker trait for Tokio's streams impl ZmtpStdStream for tokio::net::TcpStream {} #[cfg(feature = "ipc")] impl ZmtpStdStream for tokio::net::UnixStream {}