rzmq 0.5.14

High performance, fully asynchronous, safe pure-Rust implementation of ZeroMQ (ØMQ) messaging with io_uring and TCP Cork acceleration on Linux.
Documentation
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 {}