pub struct OneShotDialer<C> { /* private fields */ }Expand description
Hands out one pre-built connection, then refuses.
The Dialer a point-to-point transport wants: a moved-in UART, pipe or
socket has nothing to redial, so the second attempt is
TransportError::Closed — which run_client treats
as terminal — rather than a silent reconnect loop.
Implementations§
Trait Implementations§
Source§impl<C: Connection + 'static> Dialer for OneShotDialer<C>
impl<C: Connection + 'static> Dialer for OneShotDialer<C>
Source§fn connect(&self) -> BoxFut<'_, TransportResult<Box<dyn Connection>>>
fn connect(&self) -> BoxFut<'_, TransportResult<Box<dyn Connection>>>
Open a connection to the configured remote.
Auto Trait Implementations§
impl<C> !Freeze for OneShotDialer<C>
impl<C> !RefUnwindSafe for OneShotDialer<C>
impl<C> Send for OneShotDialer<C>
impl<C> Sync for OneShotDialer<C>
impl<C> Unpin for OneShotDialer<C>
impl<C> UnsafeUnpin for OneShotDialer<C>where
OneShot<C>: UnsafeUnpin,
impl<C> UnwindSafe for OneShotDialer<C>where
OneShot<C>: 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