mod command;
pub(crate) mod framed;
mod greeting;
pub(crate) mod handshake;
pub(crate) mod mechanism;
pub(crate) mod zmq_codec;
pub(crate) use crate::error::CodecError;
#[cfg(any(feature = "tcp", all(feature = "ipc", target_family = "unix")))]
pub(crate) use crate::error::CodecResult;
#[cfg(feature = "curve")]
pub(crate) use command::CurveFrame;
pub use command::HeartbeatFrame;
#[cfg(any(feature = "tcp", all(feature = "ipc", target_family = "unix")))]
pub(crate) use command::PlainFrame;
pub(crate) use command::ZmqCommand;
#[cfg(any(feature = "tcp", all(feature = "ipc", target_family = "unix")))]
pub(crate) use command::ZmqCommandName;
#[cfg(all(feature = "smol", not(feature = "tokio"), feature = "tcp"))]
pub(crate) use framed::smol::SmolFramedIo;
#[cfg(all(
feature = "tokio",
any(feature = "tcp", all(feature = "ipc", target_family = "unix"))
))]
pub(crate) use framed::TcpFramedIo as DefaultFramedIo;
pub use framed::{FramedIo, IntoEngineWriter};
#[cfg(all(
feature = "tokio",
any(feature = "tcp", all(feature = "ipc", target_family = "unix"))
))]
pub(crate) type RuntimeFramedIo = DefaultFramedIo;
#[cfg(all(
feature = "smol",
not(feature = "tokio"),
any(feature = "tcp", all(feature = "ipc", target_family = "unix"))
))]
pub(crate) type RuntimeFramedIo = SmolFramedIo;
pub(crate) use greeting::{ZmqGreeting, ZmtpVersion};
#[cfg(any(feature = "tcp", all(feature = "ipc", target_family = "unix")))]
pub(crate) use zmq_codec::ZmqCodec;
use crate::message::ZmqMessage;
use std::sync::Arc;
#[allow(clippy::enum_variant_names)]
#[non_exhaustive]
#[derive(Debug, Clone)]
pub enum Message {
Greeting(ZmqGreeting),
Command(ZmqCommand),
Message(ZmqMessage),
Shared(Arc<ZmqMessage>),
Heartbeat(HeartbeatFrame),
SecurityRaw(bytes::Bytes),
}