[][src]Struct async_zmq_types::SockConfig

pub struct SockConfig<'a, T> where
    T: IntoInnerSocket
{ pub ctx: Arc<Context>, pub bind: Vec<&'a str>, pub connect: Vec<&'a str>, pub identity: Option<&'a [u8]>, // some fields omitted }

The final builder step for some socket types

This contains all the information required to contstruct a valid socket, except in the case of SUB, which needs an additional filter parameter.

Fields

ctx: Arc<Context>bind: Vec<&'a str>connect: Vec<&'a str>identity: Option<&'a [u8]>

Methods

impl<'a, T> SockConfig<'a, T> where
    T: UnPair + IntoInnerSocket
[src]

pub fn bind(self, addr: &'a str) -> Self
[src]

Bind the SockConfig to an address, returning a SockConfig

This allows for a single socket to be bound to multiple addresses.

pub fn connect(self, addr: &'a str) -> Self
[src]

Connect the SockConfig to an address, returning a SockConfig

This allows for a single socket to be connected to multiple addresses.

pub fn do_build(self) -> Result<Socket, Error>
[src]

impl<'a, T> SockConfig<'a, T> where
    T: IntoInnerSocket + Pair
[src]

pub fn pair(self, addr: &'a str, bind: bool) -> PairConfig<'a>
[src]

Bind or Connect the socket to an address

This method indicates that the resulting socket will be a PAIR socket.

impl<'a, T> SockConfig<'a, T> where
    T: IntoInnerSocket + Sub
[src]

pub fn filter(self, pattern: &'a [u8]) -> SubConfig<'a>
[src]

Continue the building process into a SubConfig, for the SUB socket type which requires setting a subscription filter.

Auto Trait Implementations

impl<'a, T> Send for SockConfig<'a, T> where
    T: Send

impl<'a, T> Sync for SockConfig<'a, T> where
    T: Sync

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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