[][src]Struct libzmq::TcpAddr

pub struct TcpAddr { /* fields omitted */ }

A socket address with the TCP transport.

Supported Sockets

[Dish], [Radio], [Client] and [`Server]

Example

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

// Connecting using a IPv4 address and bind to `eth0` interface.
let ipv4: TcpAddr = "eth0;192.168.1.1:5555".try_into()?;

// Connecting using a IPv6 address.
let ipv6: TcpAddr = "[2001:db8::1]:8080".try_into()?;

Methods

impl TcpAddr[src]

pub fn new<H>(host: H) -> Self where
    H: Into<SocketAddr>, 
[src]

pub fn add_src<S>(self, src: S) -> Self where
    S: Into<SrcAddr>, 
[src]

pub fn host(&self) -> &SocketAddr[src]

pub fn src(&self) -> Option<&SrcAddr>[src]

Trait Implementations

impl Eq for TcpAddr[src]

impl PartialEq<TcpAddr> for TcpAddr[src]

impl Clone for TcpAddr[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl From<SocketAddr> for TcpAddr[src]

impl From<TcpAddr> for Endpoint[src]

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

impl IntoIterator for TcpAddr[src]

type Item = Self

The type of the elements being iterated over.

type IntoIter = IntoIter<Self>

Which kind of iterator are we turning this into?

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

type Item = Self

The type of the elements being iterated over.

type IntoIter = IntoIter<Self>

Which kind of iterator are we turning this into?

impl Debug for TcpAddr[src]

impl Display for TcpAddr[src]

impl Hash for TcpAddr[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl FromStr for TcpAddr[src]

type Err = AddrParseError

The associated error which can be returned from parsing.

impl TryFrom<String> for TcpAddr[src]

type Error = AddrParseError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a String> for TcpAddr[src]

type Error = AddrParseError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a str> for TcpAddr[src]

type Error = AddrParseError

The type returned in the event of a conversion error.

impl Serialize for TcpAddr[src]

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

Auto Trait Implementations

impl Send for TcpAddr

impl Sync for TcpAddr

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> From<T> for 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, 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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]