Struct async_zmq_types::SocketBuilder
source · 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
sourceimpl<'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 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> RefUnwindSafe for SocketBuilder<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SocketBuilder<'a, T>where
T: Send,
impl<'a, T> Sync for SocketBuilder<'a, T>where
T: Sync,
impl<'a, T> Unpin for SocketBuilder<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for SocketBuilder<'a, T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more