[][src]Struct libzmq::InprocAddr

pub struct InprocAddr { /* fields omitted */ }

A socket address with inter-thread transport.

The inproc address is a non-empty String with at most INPROC_MAX_SIZE characters.

The inproc transport can only be used by sockets that share the same Ctx.

Supported Sockets

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

Example

use libzmq::InprocAddr;
use std::convert::TryInto;

// Can be any arbitrary string.
let addr: InprocAddr = "test".try_into()?;
// Any character is allowed.
let addr: InprocAddr = "LKH*O&_[::O2134KG".try_into()?;

Methods

impl InprocAddr[src]

pub fn new<S>(host: S) -> Result<Self, AddrParseError> where
    S: Into<String>, 
[src]

pub fn new_unique() -> Self[src]

Creates a new unique InprocAddr by generating a uuid v4.

This is the inproc equivalent of a system assigned port.

Example

use libzmq::{prelude::*, InprocAddr, ServerBuilder};

let addr = InprocAddr::new_unique();

let server = ServerBuilder::new()
    .bind(addr)
    .build()?;

pub fn as_str(&self) -> &str[src]

Trait Implementations

impl PartialEq<InprocAddr> for InprocAddr[src]

impl From<InprocAddr> for Endpoint[src]

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

impl Clone for InprocAddr[src]

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

Performs copy-assignment from source. Read more

impl IntoIterator for InprocAddr[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 InprocAddr[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 Eq for InprocAddr[src]

impl Debug for InprocAddr[src]

impl Display for InprocAddr[src]

impl FromStr for InprocAddr[src]

type Err = AddrParseError

The associated error which can be returned from parsing.

impl TryFrom<String> for InprocAddr[src]

type Error = AddrParseError

The type returned in the event of a conversion error.

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

type Error = AddrParseError

The type returned in the event of a conversion error.

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

type Error = AddrParseError

The type returned in the event of a conversion error.

impl Hash for InprocAddr[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 Serialize for InprocAddr[src]

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

Auto Trait Implementations

impl Send for InprocAddr

impl Sync for InprocAddr

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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> ToString for T where
    T: Display + ?Sized
[src]

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

impl<T> BorrowMut<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]