[][src]Enum libzmq::addr::Endpoint

pub enum Endpoint {
    Tcp(TcpAddr),
    Udp(UdpAddr),
    Inproc(InprocAddr),
    Pgm(PgmAddr),
    Epgm(EpgmAddr),
}

A transport and a transport-specific address supported by ØMQ.

The transport specifies the underlying protocol to use. The address specifies the transport-specific address to connect to.

Bind vs. Connect

For most transports and socket types the connection is not performed immediately but as needed by ØMQ. Thus a successful call to connect does not mean that the connection was or could actually be established. Because of this, for most transports and socket types the order in which a server socket is bound and a client socket is connected to it does not matter.

Summary of Transports

Transport strDescriptionReference
"tcp"unicast transport using TCPzmq_tcp
"udp"UDP multicast and unicast transportzmq_udp
"ipc"local inter-process communication transportzmq_ipc
"inproc"local in-process communication transportzmq_inproc
"pgm", "epgm"reliable multicast transport using PGMzmq_pgm
"vmci"virtual machine communications interfacezmq_vmci

Example

use libzmq::{prelude::TryInto, TcpAddr, addr::Endpoint};

// IPv4 addr with TCP transport.
let addr: TcpAddr = "127.0.0.1:9090".try_into()?;
let endpoint: Endpoint = addr.into();
assert!(endpoint.is_tcp());

This enum type is non-exhaustive and 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.

Variants

Tcp(TcpAddr)

Unicast transport using TCP, see zmq_tcp.

Udp(UdpAddr)

ØMQ UDP multicast and unicast transport

Inproc(InprocAddr)

Local in-process (inter-thread) communication transport

Pgm(PgmAddr)

Reliable multicast transport using PGM, see zmq_pgm.

Epgm(EpgmAddr)

Reliable multicast transport using EPGM, see zmq_pgm.

Implementations

impl Endpoint[src]

pub fn is_tcp(&self) -> bool[src]

Returns true if the endpoint uses the Tcp transport.

pub fn is_udp(&self) -> bool[src]

Returns true if the endpoint uses the Ucp transport.

pub fn is_inproc(&self) -> bool[src]

Returns true if the endpoint uses the Inproc transport.

pub fn is_pgm(&self) -> bool[src]

Returns true if the endpoint uses the Pgm transport.

pub fn is_edpgm(&self) -> bool[src]

Returns true if the endpoint uses the Epgm transport.

Trait Implementations

impl AsRef<Endpoint> for Endpoint[src]

impl Clone for Endpoint[src]

impl Debug for Endpoint[src]

impl<'de> Deserialize<'de> for Endpoint[src]

impl Eq for Endpoint[src]

impl<'a> From<&'a Endpoint> for Endpoint[src]

impl<'a> From<&'a EpgmAddr> for Endpoint[src]

impl<'a> From<&'a InprocAddr> for Endpoint[src]

impl<'a> From<&'a PgmAddr> for Endpoint[src]

impl<'a> From<&'a TcpAddr> for Endpoint[src]

impl<'a> From<&'a UdpAddr> for Endpoint[src]

impl From<EpgmAddr> for Endpoint[src]

impl From<InprocAddr> for Endpoint[src]

impl From<PgmAddr> for Endpoint[src]

impl From<TcpAddr> for Endpoint[src]

impl From<UdpAddr> for Endpoint[src]

impl Hash for Endpoint[src]

impl IntoIterator for Endpoint[src]

type Item = Endpoint

The type of the elements being iterated over.

type IntoIter = IntoIter<Endpoint>

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a Endpoint[src]

type Item = &'a Endpoint

The type of the elements being iterated over.

type IntoIter = IntoIter<&'a Endpoint>

Which kind of iterator are we turning this into?

impl PartialEq<Endpoint> for Endpoint[src]

impl Serialize for Endpoint[src]

impl StructuralEq for Endpoint[src]

impl StructuralPartialEq for Endpoint[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

type Owned = T

The resulting type after obtaining ownership.

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>,