pub struct LocalClientBuilder<F: Future<Output = ()> + Send + 'static, SA: ToSocketAddrs> { /* private fields */ }Implementations§
Source§impl<F: Future<Output = ()> + Send + 'static, SA: ToSocketAddrs> LocalClientBuilder<F, SA>
impl<F: Future<Output = ()> + Send + 'static, SA: ToSocketAddrs> LocalClientBuilder<F, SA>
pub fn new() -> LocalClientBuilder<F, SA>
pub fn event_handler( self, event_handler: fn(ConnectionEvent<LocalClient>) -> F, ) -> Result<Self>
pub fn addr(self, addr: SA) -> Result<Self>
Sourcepub async fn connect(self) -> Result<LocalClientHandle>
pub async fn connect(self) -> Result<LocalClientHandle>
Connect to the target address.
Connects to the specified address using TCP. It blocks until a connection has been made but does not block while the connection is alive.
Trait Implementations§
Auto Trait Implementations§
impl<F, SA> Freeze for LocalClientBuilder<F, SA>where
SA: Freeze,
impl<F, SA> RefUnwindSafe for LocalClientBuilder<F, SA>where
SA: RefUnwindSafe,
impl<F, SA> Send for LocalClientBuilder<F, SA>where
SA: Send,
impl<F, SA> Sync for LocalClientBuilder<F, SA>where
SA: Sync,
impl<F, SA> Unpin for LocalClientBuilder<F, SA>where
SA: Unpin,
impl<F, SA> UnsafeUnpin for LocalClientBuilder<F, SA>where
SA: UnsafeUnpin,
impl<F, SA> UnwindSafe for LocalClientBuilder<F, SA>where
SA: UnwindSafe,
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