[−][src]Enum libzmq::addr::Endpoint
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 str | Description | Reference |
---|---|---|
"tcp" | unicast transport using TCP | zmq_tcp |
"udp" | UDP multicast and unicast transport | zmq_udp |
"ipc" | local inter-process communication transport | zmq_ipc |
"inproc" | local in-process communication transport | zmq_inproc |
"pgm", "epgm" | reliable multicast transport using PGM | zmq_pgm |
"vmci" | virtual machine communications interface | zmq_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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
fn from(addr: &'a InprocAddr) -> 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]
fn from(addr: InprocAddr) -> 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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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?
fn into_iter(self) -> Self::IntoIter
[src]
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl PartialEq<Endpoint> for Endpoint
[src]
impl Serialize for Endpoint
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Endpoint
[src]
impl StructuralPartialEq for Endpoint
[src]
Auto Trait Implementations
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,