[][src]Enum internet2::transport::zmqsocket::ZmqType

#[repr(u8)]
#[non_exhaustive]pub enum ZmqType {
    Pull,
    Push,
    Req,
    Rep,
    Pub,
    Sub,
    RouterBind,
    RouterConnect,
}

API type for node-to-node communications used by ZeroMQ

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Pull

Pure peer-to-peer communications done with PUSH/PULL pair of ZMQ sockets. Each node can send unordered set of messages and does not wait for a response. This part represents listening socket (zmq::SocketType::PULL)

Push

Pure peer-to-peer communications done with PUSH/PULL pair of ZMQ sockets. Each node can send unordered set of messages and does not wait for a response. This part represents connected socket (zmq::SocketType::PUSH)

Req

Remote procedure call communications done with REQ/REP pair of ZMQ sockets. Two roles: client and server; client sends requests and awaits for client responses. This part represents client-size socket (zmq::SocketType::REQ)

Rep

Remote procedure call communications done with REQ/REP pair of ZMQ sockets. Two roles: client and server; client sends requests and awaits for client responses. This part represents client-size socket (zmq::SocketType::REP)

Pub

Subscription API done with SUB/PUB pair of ZMQ sockets. Two roles: publisher (server) and subscriber (client); subscriber awaits for messages from publisher and does not communicates back. This part represents publisher part (zmq::SocketType::PUB)

Sub

Subscription API done with SUB/PUB pair of ZMQ sockets. Two roles: publisher (server) and subscriber (client); subscriber awaits for messages from publisher and does not communicates back. This part represents subscriber part (zmq::SocketType::SUB)

RouterBind

Message bus: each message has a receiver and sender, and multiple peers may communicate directly with each other in asynchronous mode. Represents zmq::SocketType::ROUTER socket which is bind to

RouterConnect

Message bus: each message has a receiver and sender, and multiple peers may communicate directly with each other in asynchronous mode. Represents zmq::SocketType::ROUTER socket wich is connected to

Implementations

impl ZmqType[src]

pub fn socket_type(&self) -> SocketType[src]

Returns zmq::SocketType corresponding to the given [ApiType]

pub fn api_name(&self) -> String[src]

Returns name for the used ZMQ API type that can be used as a part of URL query

Trait Implementations

impl Clone for ZmqType[src]

impl Copy for ZmqType[src]

impl Debug for ZmqType[src]

impl Display for ZmqType[src]

impl Eq for ZmqType[src]

impl FromStr for ZmqType[src]

type Err = UnknownApiType

The associated error which can be returned from parsing.

impl Hash for ZmqType[src]

impl Ord for ZmqType[src]

impl PartialEq<ZmqType> for ZmqType[src]

impl PartialOrd<ZmqType> for ZmqType[src]

impl StructuralEq for ZmqType[src]

impl StructuralPartialEq for ZmqType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,