#[repr(u8)]pub enum SocketType {
Pair = 0,
Pub = 1,
Sub = 2,
Req = 3,
Rep = 4,
Dealer = 5,
Router = 6,
Pull = 7,
Push = 8,
XPub = 9,
XSub = 10,
Stream = 11,
}Expand description
ZeroMQ socket types.
Corresponds to ZMQ_TYPE socket option (16).
Variants§
Pair = 0
PAIR socket for exclusive bidirectional communication
Pub = 1
PUB socket for publishing messages to subscribers
Sub = 2
SUB socket for subscribing to published messages
Req = 3
REQ socket for synchronous request-reply client
Rep = 4
REP socket for synchronous request-reply server
Dealer = 5
DEALER socket for asynchronous request-reply patterns
Router = 6
ROUTER socket for routing messages by identity
Pull = 7
PULL socket for receiving messages from pushers
Push = 8
PUSH socket for sending messages to pullers
XPub = 9
XPUB socket for extended publisher with subscription awareness
XSub = 10
XSUB socket for extended subscriber with dynamic subscriptions
Stream = 11
STREAM socket for raw TCP connections.
Enables bridging between ZMTP peers and plain TCP connections, with per-peer routing IDs on every message.
Implementations§
Source§impl SocketType
impl SocketType
Sourcepub const fn is_compatible(&self, peer: SocketType) -> bool
pub const fn is_compatible(&self, peer: SocketType) -> bool
Check if this socket type is compatible with the given peer type.
Trait Implementations§
Source§impl Clone for SocketType
impl Clone for SocketType
Source§fn clone(&self) -> SocketType
fn clone(&self) -> SocketType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SocketType
Source§impl Debug for SocketType
impl Debug for SocketType
Source§impl Display for SocketType
impl Display for SocketType
impl Eq for SocketType
Source§impl Hash for SocketType
impl Hash for SocketType
Source§impl PartialEq for SocketType
impl PartialEq for SocketType
Source§fn eq(&self, other: &SocketType) -> bool
fn eq(&self, other: &SocketType) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SocketType
Auto Trait Implementations§
impl Freeze for SocketType
impl RefUnwindSafe for SocketType
impl Send for SocketType
impl Sync for SocketType
impl Unpin for SocketType
impl UnsafeUnpin for SocketType
impl UnwindSafe for SocketType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more