Enum zeromq::SocketType
source · #[repr(usize)]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,
}
Variants§
PAIR = 0
PUB = 1
SUB = 2
REQ = 3
REP = 4
DEALER = 5
ROUTER = 6
PULL = 7
PUSH = 8
XPUB = 9
XSUB = 10
STREAM = 11
Implementations§
source§impl SocketType
impl SocketType
pub const fn as_str(&self) -> &'static str
sourcepub fn compatible(&self, other: SocketType) -> bool
pub fn compatible(&self, other: SocketType) -> bool
Checks if two sockets are compatible with each other
use zeromq::SocketType;
assert!(SocketType::PUB.compatible(SocketType::SUB));
assert!(SocketType::REQ.compatible(SocketType::REP));
assert!(SocketType::DEALER.compatible(SocketType::ROUTER));
assert!(!SocketType::PUB.compatible(SocketType::REP));
Trait Implementations§
source§impl Clone for SocketType
impl Clone for SocketType
source§fn clone(&self) -> SocketType
fn clone(&self) -> SocketType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SocketType
impl Debug for SocketType
source§impl Display for SocketType
impl Display for SocketType
source§impl FromStr for SocketType
impl FromStr for SocketType
source§impl Hash for SocketType
impl Hash for SocketType
source§impl Ord for SocketType
impl Ord for SocketType
source§fn cmp(&self, other: &SocketType) -> Ordering
fn cmp(&self, other: &SocketType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SocketType
impl PartialEq for SocketType
source§fn eq(&self, other: &SocketType) -> bool
fn eq(&self, other: &SocketType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SocketType
impl PartialOrd for SocketType
source§fn partial_cmp(&self, other: &SocketType) -> Option<Ordering>
fn partial_cmp(&self, other: &SocketType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&[u8]> for SocketType
impl TryFrom<&[u8]> for SocketType
impl Copy for SocketType
impl Eq for SocketType
impl StructuralEq for SocketType
impl StructuralPartialEq for SocketType
Auto Trait Implementations§
impl RefUnwindSafe for SocketType
impl Send for SocketType
impl Sync for SocketType
impl Unpin 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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more