pub struct SocketBuilder<'a, T>where
T: IntoInnerSocket,{ /* private fields */ }
Expand description
The root struct for a Socket builder
This struct contains a context and an identity.
Implementations§
Source§impl<'a, T> SocketBuilder<'a, T>where
T: IntoInnerSocket,
impl<'a, T> SocketBuilder<'a, T>where
T: IntoInnerSocket,
Sourcepub fn new(ctx: Arc<Context>) -> Self
pub fn new(ctx: Arc<Context>) -> Self
Create a new Socket builder
All sockets that are created through the Async ZMQ Types library will use this as the base for their socket builder (except PAIR sockets).
Sourcepub fn customize<F>(self, f: F) -> Self
pub fn customize<F>(self, f: F) -> Self
Provide a function for configuring the underlying ZeroMQ socket
Note: Only the last call to customize will apply to a given socket.
Documentation can be found here
Sourcepub fn bind(self, addr: &'a str) -> SockConfig<'a, T>
pub fn bind(self, addr: &'a str) -> SockConfig<'a, T>
Bind the socket to an address
Since this is just part of the builder, and the socket doesn’t exist yet, we store the address for later retrieval.
Sourcepub fn connect(self, addr: &'a str) -> SockConfig<'a, T>
pub fn connect(self, addr: &'a str) -> SockConfig<'a, T>
Connect the socket to an address
Since this is just part of the builder, and the socket doesn’t exist yet, we store the address for later retrieval.
Auto Trait Implementations§
impl<'a, T> Freeze for SocketBuilder<'a, T>
impl<'a, T> !RefUnwindSafe for SocketBuilder<'a, T>
impl<'a, T> !Send for SocketBuilder<'a, T>
impl<'a, T> !Sync for SocketBuilder<'a, T>
impl<'a, T> Unpin for SocketBuilder<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for SocketBuilder<'a, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more